csv, perl and German umlaute

A

abadiya

Hi,

I'm using Mason/Perl. At the moment I'm trying to pull data out of a
csv-file into an html file with the help of Perl. Works fine but I
have problems with the displayal of German umlaute. Sometimes they are
displayed, sometimes I get questionmarks where the umlaute should be.
Changes almost every time I refresh the page.

I've got this line at the beginning of my code to force the page to
use utf8 but it won't work.
<%method .utf8></%method>

Can you help me?

Best Wishes
 
A

abadiya

I don't know what charset you use in html code but for accented
characters you can use HTML entity codes.

But that would mean I have to use entities within the csv-file? If I
do that Perl stops printing after the first umlaut because of the
semicolon in the entity (e.g. &uuml;). :(
 
J

Josef Moellers

abadiya said:
Hi,

I'm using Mason/Perl. At the moment I'm trying to pull data out of a
csv-file into an html file with the help of Perl. Works fine but I
have problems with the displayal of German umlaute. Sometimes they are
displayed, sometimes I get questionmarks where the umlaute should be.
Changes almost every time I refresh the page.

I've got this line at the beginning of my code to force the page to
use utf8 but it won't work.
<%method .utf8></%method>

Can you help me?

You know that with Text::CSV_XS you have to specify "binary => 1" with
the new method to pick up those letters (BTDTGT)?
As you have shown us no code, there's little we can tell about what you
may do wrong.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top