Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Tie::File failing with Unicode/UTF-8 encoding?

by Kenosis (Priest)
on Nov 03, 2012 at 16:38 UTC ( [id://1002118]=note: print w/replies, xml ) Need Help??


in reply to Tie::File failing with Unicode/UTF-8 encoding?

Running your code produces the following console output on my machine (Windows 7, ActivePerl):

0 τι κάνετε; 1 πάρτε το ή αφ&#942 +;στε το 2 שלום חברים 3 abc לא כןכן efg 4 מתי ולאן This is it 5 מעכשיו לעכ&#15 +13;יו 6 Σήμερα είναι +Τρίτη 7 Θέλω να φάω 8 τι κάνετε; 9 שורה מס' 5

The tied-file's contents:

τι κάνετε; πάρτε το ή αφή& +#963;τε το שלום חברים abc לא כןכן efg מתי ולאן This is it מעכשיו לעכ&#1513 +;יו Σήμερα είναι &# +932;ρίτη Θέλω να φάω τι κάνετε; שורה מס' 5

I didn't get the errors you're reporting.

On a separate topic, Tie::File works well with smaller files, but performance significantly slows with files > 10M, in case you may be working with such.

Replies are listed 'Best First'.
Re^2: Tie::File failing with Unicode/UTF-8 encoding?
by HelenCr (Monk) on Nov 03, 2012 at 18:46 UTC

    Kenosis: this is very interesting.

    1. Is there a quick way to convert back the PerlMonks output, so that Unicode/UTF8 editors can show it in the original encoding?

    2. It seems that in your setup (apparently, the difference is ActivePerl vs. StrawberryPerl/DWIMPerl that I am using), the problem does not occur. Could the cause be the Tie::File code? StrawberryPerl uses $VERSION = "0.97_02"; Which version is ActivePerl using?

      1. I don't know about these things... Yet...
      2. ActivePerl uses $VERSION = "0.98" for Tie::File. Perhaps upgrading the Module is worth a try (or tie).

        I have updated Tie::File to Version 0.98. It didn't help.

        This is very strange. The problem must be lying somewhere else.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1002118]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (1)
As of 2024-04-16 21:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found