[administrivia at end]
but since you insist on raising it, don't be too surprised to get a
response ( - and now both of us should not be too surprised to be told
to get ourselves hence to a more appropriate newsgroup...)
WML is very unforgiving with its range of displayable characters.
Could you be more specific? I didn't have time to read the license
terms and consult with my employer and their lawyers whether I was OK
to accept them, so I wasn't able to get to the actual WML
specification at wapforum, but I gathered from what was written here
that utf-8 was wanted, and I answered on that basis.
Others here may disagree with this method, but
I've found it to be very helpful.
s/([\x{80}-\x{FFFF}])/'&#' . ord($1) . ';'/gse;
But what benefit does this bring relative to utf-8 coding, if utf-8
coding is part of the specification?
By the way, where does your data come from, what encoding was it in,
did you remember (obPerl) to tell perl what encoding it was in when
you read or otherwise retrieved it?
I see two things wrong already. The Unicode characters from x80 to
x9f are obscure control characters, not displayable glyphs; if you get
any of those as display characters then something is wrong (probably
Bill Gates got a bit too close to your WML) and presumably you should
reject them, if WML is meant to be as unforgiving as you say.
And then Unicode no longer stops at xffff, there are characters beyond
there. I don't know WML well enough, as you can see, but if it allows
them then why wouldn't you support them; but if they aren't, then why
wouldn't you want to report them as an error?
That line will change characters above the first 128 ASCII characters
Ahem, *bogosity alert*. ASCII is a 7-bit code, the "first 128 ASCII
characters" is all that there are.
to their numeric equivalent, which WML should be able to display.
So it should, but if utf-8 encoding is expected, why not use it? It's
not as if the max document size is generous, so I'd say use the most
compact representation that you are able to. What am I missing?
have not personally encountered very high range characters in my WML,
such as "?" and other ligature type characters,
^^^
eh?? Quick check of your headers shows
| Content-Type: text/plain; charset=ISO-8859-1
Whatever it was that you were trying to type, it seems iso-8859-1
doesn't have it on offer.
Also (off-topic to Perl), make sure you keep your file sizes under
1400 bytes.
Yup, that was my point above.
cheers