Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

vowel mutations

by m0ve (Scribe)
on Aug 16, 2007 at 10:34 UTC ( [id://632984]=perlquestion: print w/replies, xml ) Need Help??

m0ve has asked for the wisdom of the Perl Monks concerning the following question:

hi monks, my script wont write vowel mutations (ö,ä,ü,...) to file, i always get some strange special characters. however if i just print to screen it works fine. any hints on how to solve this or where i might find helpfull documentation ?

Replies are listed 'Best First'.
Re: vowel mutations
by moritz (Cardinal) on Aug 16, 2007 at 10:41 UTC
    The text editor you are viewing the file with probably expects a different character encoding than your terminal.

    It would be helpfull to know your OS, the charset settings of your terminal and of your text editor.

    Since you list Umlauts it's probably a latin1 <-> utf8 problem, but that's just a guess.

    And take a look at Encode and utf8.

      OS : WinXP SP2
      and charset, as u assumed, should be latin1.
      i tried various texteditors (textpad, windows editor and wordpad, ...)
      thanks for the links, i'lll look for something helpfull there
Re: vowel mutations
by graff (Chancellor) on Aug 17, 2007 at 02:43 UTC
    It would have been helpful to post some of your code. In particular, suppose you try to create a really simple, minimal script that prints accented characters just fine on the terminal, but when you run it like this:
    perl test_script.pl > test.txt
    and look at test.txt, those characters are messed up. Then we could look at your code, and even run it on different machines, to give you more useful advice.

    It probably makes a difference where those accented letters are coming from (some other input file? hard-coded in the script?) And what version of perl are you using?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2024-04-19 18:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found