4

Possible Duplicate:
Why does modern Perl avoid UTF-8 by default?

I have one problem with order script written in Perl which is used to generate order/email based on user input. The problem is that letters like ( ŽĆČĐŠ) that are used in my language (Croatian) are missing. For instance, when a user makes an order and he uses those letters, they will not show in the order we receive to our e-mail or in order that user gets on his screen after completion.

I have tried to add

use utf8;
use encoding "iso 8859-2";

at the beginning of Perl script, but now instead of blank spaces I get this:

\x{00a9}pi\x{00e8}kovina   this should have been Špičkovina

I do not have vast programming knowledge so don't know if I should define encoding for each output separately or it is enough to put the encoding at the beginning of the Perl script.

Community
  • 1
  • 1
Celestin
  • 51
  • 2
  • 5
    Sorry, there is not one magic thing you can do to make everything work as intended, it depends on the input and libraries involved. Show your code, then people can help point out the places where code needs to be changed to properly deal with characters. Meanwhile, read and understand [the basics of encoding](http://p3rl.org/UNI). - Write `use utf8;` if you have Unicode literals in your program source code, then also save the file encoded as UTF-8. `use encoding` pragma is broken, delete this. – daxim Mar 29 '12 at 11:53

0 Answers0