The description of your problem is a little vague. Naturally, a little of the actual code that demonstrates the problem would be very helpful. Specifically, I'd be interested in knowing:
- What happens in your code that qualifies an HTTP request as "the first time a call is made" vs. "the second time"
- Where does said "string" come from and are you explicitly storing it somewhere in between the "first" and "second" calls
- What character encoding are you sending to the browser as part of the Content-type HTTP header
- What do you mean when you say that "utf-8 chars on the screen ... only show properly if you put your browser decoding back to latin1" (more specifically, how do you know they're utf-8 characters if they display correctly when you tell your browser they're latin1?)
- Have you tried using
Encode::_utf8_on() Encode::decode_utf8() to convert the data from a bytestring to the UTF-8 data that bytestring represents?
- Have you compared Devel::Peek::Dump() output on the string from the "first" to the "second" calls to see what is different about the underlying data
-
UPDATE: Are you explicitly storing/retrieving something in an APR::Table or just assuming that mod_perl is using it in some way behind the scenes
Hopefully those items will help us all figure out what's causing your problem!
-- Brian
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.