Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I doubt that. I suspect the HTML was buggy too.

Could you show the HTML's HEAD element and the od -c output for réserve?

( Update: hum, .exe? You might not have od. Alternative: perl -nE"say unpack 'H*', $_ if /serv/;" file.html )

I once again recommend the uniquote program for such things. It is really way better than od or cat -v or anything, because it actually shows you the proper characters.
$ perl -Mutf8 -CS -wle 'print "réserve"' | uniquote r\N{U+E9}serve $ perl -Mutf8 -CS -wle 'print "réserve"' | uniquote -x r\x{E9}serve $ perl -Mutf8 -CS -wle 'print "réserve"' | uniquote -v r\N{LATIN SMALL LETTER E WITH ACUTE}serve $ perl -Mutf8 -CS -wle 'print "réserve"' | uniquote -b r\xC3\xA9serve $ perl -Mutf8 -CS -wle 'print "réserve"' | uniquote --xml r&#xe9;serve $ perl -Mutf8 -CS -wle 'print "réserve"' | uniquote --html r&#233;serve $ perl -Mutf8 -CS -wle 'print "réserve"' | uniquote --html --verbose r&eacute;serve $ perl -Mutf8 -CS -wle 'print "réserve"' | nfd | uniquote -v re\N{COMBINING ACUTE ACCENT}serve $ perl -Mutf8 -CS -wle 'print "réserve"' | iconv -f UTF-8 -t UTF-16 | +uniquote --encoding=UTF-16 -x r\x{E9}serve $ perl -Mutf8 -CS -wle 'print "réserve"' | iconv -f UTF-8 -t UTF-16 | +uniquote -b \xFE\xFF\x00r\x00\xE9\x00s\x00e\x00r\x00v\x00e\x00 $ perl -Mutf8 -CS -wle 'print "réserve"' | iconv -f UTF-8 -t MacRoman +| uniquote --encoding=MacRoman -x r\x{E9}serve $ perl -Mutf8 -CS -wle 'print "réserve"' | iconv -f UTF-8 -t MacRoman +| uniquote -b r\x8Eserve $ perl -Mutf8 -CS -wle 'print "réserve"' > reserve.utf8 $ iconv -f UTF-8 -t MacRoman < reserve.utf8 > reserve.macroman $ iconv -f UTF-8 -t UTF16-BE < reserve.utf8 > reserve.utf16be $ uniwc reserve.{macroman,utf8,utf16be} Paras Lines Words Graphs Chars Bytes File 0 1 1 8 8 8 reserve.macroman 0 1 1 8 8 9 reserve.utf8 0 1 1 8 8 16 reserve.utf16be $ uniquote reserve.{macroman,utf8,utf16be} r\N{U+E9}serve r\N{U+E9}serve r\N{U+E9}serve $ uniquote -b reserve.{macroman,utf8,utf16be} r\x8Eserve r\xC3\xA9serve \x00r\x00\xE9\x00s\x00e\x00r\x00v\x00e\x00
See how nifty that is?

In reply to Re^4: Encoding/decoding question by tchrist
in thread Encoding/decoding question by slugger415

Title:
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 How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-24 09:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found