Loading ...
Sorry, an error occurred while loading the content.

Re: UTF8 - Who is wrong? Apache::ASP or mod_perl or Apache or Perl?

Expand Messages
  • Warren Young
    ... If you search the archives for a post I made less than a year back, you will find that I documented some interesting conversion chains in my application.
    Message 1 of 2 , Dec 16, 2004
    • 0 Attachment
      k_berov wrote:

      > Hi Boys. I think it's perl's fault, but if someone of you had such
      > problems and tell mi what is wrong, I will be very gratefull.

      If you search the archives for a post I made less than a year back, you
      will find that I documented some interesting conversion chains in my
      application. You might find it helpful to read through it.

      The core of the problem is that Perl does not run in UTF-8 mode by
      default. It either tries to guess that it should use UTF-8 (e.g. the
      LANG environment variable) or it is told that it should use UTF-8 by
      directive. So for instance, the Apache::ASP Perl interpreter could be
      seeing a different environment than other Perl code on your system
      because of the way mod_perl works, and so it will convert incoming UTF-8
      to Latin-1. Then if your httpd is configured to use UTF-8, it may try
      to convert Latin-1 back to UTF-8.

      The thing to do is to carefully find all of the stages in your system by
      tracing data through the system. Once you find all the transition
      points, you will know which code needs to be changed to enforce a pure
      UTF-8 data path.

      > It is interesting that Perl 5.6.1 does not make such problems

      That's because Perl 5.6 made fewer attempts to convert data. 5.8 is
      more "clever", which can be a problem as well as a benefit.

      > There should be no reason for this disaster to happen to me.

      Sure there's a reason. It's called Murphy's Law. Cope with it.

      ---------------------------------------------------------------------
      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    Your message has been successfully submitted and would be delivered to recipients shortly.