Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

French characters: perl 5.005 vs 5.6x vs 5.8x

by the_slycer (Chaplain)
on Nov 15, 2005 at 17:32 UTC ( #508703=perlquestion: print w/replies, xml ) Need Help??

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

Hi there, I've got a bit of a problem that I've been banging my head on for a while now..

I work in a company where our development environments are perl 5.6.0 on Redhat 7.x machines, one of our production enviroments is perl 5.005 on Redhat 7.x machines, and another production environment using 5.8.0 on Redhat 9.x machines.

We have a few different scripts that generate various "reports" using data from an Oracle database, these run on the 5.8.0 environment. This normally works fine, however, some of the data in the reports contain French characters. When generating the reports in development, test (also 5.6.0), or the 5.005 production environment, these characters show up "normally" - accents are correct etc. When generating the reports on the 5.8.0 box, the french characters either get stripped (accents are gone) or are replaced with ? characters.

I suspect that this is an i18n/unicode problem of some kind, but I'm not sure how I can "fix" it. The LANG environment variable is currently set to "en_US.iso885915" on the 5.8.0 machine(s), and en_US on all other machines. Changing the environment variable on the 5.8.0 machine results in a lot of errors like: Malformed UTF-8 character (unexpected non-continuation byte 0x70, immediately after start byte 0xe9)

Before anybody asks, modifying the enviroments to be all the same is a huge undertaking that the company is currently unwilling to spend the time to do... as much as I might like to.

update Sorry, I forgot to mention some further detail - the reports are created in various formats (pdf + html), this occurs in all formats. Reading the html generated from the production environment alongside the html generated from the development environment (same machine, same browser) still shows the problem - so it's definitely not a browser setting :)

Replies are listed 'Best First'.
Re: French characters: perl 5.005 vs 5.6x vs 5.8x
by the_slycer (Chaplain) on Nov 15, 2005 at 18:57 UTC
    Ignore this post...

    Turns out it's got nothing at all to do with perl (which was my suspicion in the first place).
    Setting the NLS_LANG env variable worked fine, Oracle uses that to determine language settings etc, and it was not properly setup on the 5.8.0 box.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://508703]
Approved by ww
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2020-05-27 22:46 GMT
Find Nodes?
    Voting Booth?
    If programming languages were movie genres, Perl would be:

    Results (162 votes). Check out past polls.