Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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

In reply to Re: utf8 problems by bpphillips
in thread utf8 problems by jbrugger

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (1)
As of 2022-01-28 00:19 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (72 votes). Check out past polls.