CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: Re: [7stud] hex metacharacters for characters below x100: Edit Log



7stud
Enthusiast

Mar 28, 2010, 11:39 PM


Views: 5120
Re: [7stud] hex metacharacters for characters below x100

This from perluniintro:


Quote
Internally, Perl currently uses either whatever the native eight-bit
character set of the platform (for example Latin-1) is, defaulting to
UTF-8, to encode Unicode strings. Specifically, if all code points in
the string are 0xFF or less, Perl uses the native eight-bit character
set. Otherwise, it uses UTF-8.


Despite what that says, it's possible that perl stores the Unicode code point internally. But there may not be a way to know that. On output, perl may just encode with Latin-1 for single byte characters and UTF-8 for multi-byte characters.

It seems that today most computer languages have completely screwed up their unicode support. They try to make things transparent for beginners who don't know what unicode is by employing all kinds of implicit, automatic conversions--which just serves to make the whole system completely baffling to people who know about unicode.

There should be a pragma that allows you to turn off all automatic conversions so that you can handle the encoding and decoding of everything yourself.

Did you try copying my program and deleting the initial string, and then pasting the UTF-8 characters into the string yourself?


(This post was edited by 7stud on Mar 29, 2010, 12:27 AM)


Edit Log:
Post edited by 7stud (Enthusiast) on Mar 28, 2010, 11:44 PM
Post edited by 7stud (Enthusiast) on Mar 28, 2010, 11:49 PM
Post edited by 7stud (Enthusiast) on Mar 28, 2010, 11:50 PM
Post edited by 7stud (Enthusiast) on Mar 28, 2010, 11:52 PM
Post edited by 7stud (Enthusiast) on Mar 29, 2010, 12:26 AM
Post edited by 7stud (Enthusiast) on Mar 29, 2010, 12:27 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives