Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^8: How to reverse a (Unicode) string

by ikegami (Pope)
on Jan 10, 2011 at 16:38 UTC ( #881507=note: print w/replies, xml ) Need Help??


in reply to Re^7: How to reverse a (Unicode) string
in thread How to reverse a (Unicode) string

You have to always decode.

No, you don't have to with US-ASCII and iso-8859-1.

But that wasn't part of Juerds claim.

I agree. He didn't mention any relation between the first 128 characters of iso-8859-1 and UTF-8. No idea why you bring this up.

iso-8859-1 is an encoding (of a subset of Unicode)

Unicode is a character set, not an encoding, so that sentence is broken.

iso-8859-1 is both a character set and an encoding. The iso-8859-1 character set is a subset of the Unicode character character set, but this property does NOT explain why iso-8859-1 works without being decoded.

  • Comment on Re^8: How to reverse a (Unicode) string

Replies are listed 'Best First'.
Re^9: How to reverse a (Unicode) string
by JavaFan (Canon) on Jan 10, 2011 at 16:48 UTC
    No, you don't have to with US-ASCII and iso-8859-1.
    Sure you do. It's not a difficult encoding, but it still is an encoding.
    Unicode is a character set, not an encoding, so that sentence is broken.
    Wait. You are saying that a sentence of the form "X is an encoding of Y" is broken in English is Y isn't an encoding?

    I guess that "UTF-8 is an encoding of Unicode" is equally broken. For the reason that Unicode isn't an encoding in that sentence either.

      Sure you do

      Why do you keep insisting there's a need to apply an identity function? Or are you saying decoding ASCII isn't an identity function? It's hard to tell since you're nay-saying without any explanation.

      You are saying that a sentence of the form "X is an encoding of Y" is broken in English [if] Y isn't an encoding?

      I seem to have misread what you said. (Perhaps I missed the "of"?) Striken.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://881507]
help
Chatterbox?
[marinersk]: s/smack/whap/;
[talexb]: Wow, what hilariously bad form.
[SuicideJunkie]: Just wait; someday soon, you'll be given a DB with unicode emojis in the column names.
[Corion]: marinersk: Well, I have done select statements like select sum(foo) as "Total Amount", ..., but to have a table like that makes me shudder
[Corion]: SuicideJunkie: :-D
[marinersk]: SuicideJunkie LOL
[choroba]: Woohoo! Fixed a test that hasn't run for 3 years.
[marinersk]: Corion Yes, sometimes whitespace in column headers is acceptable, but I still consider it be less than desireable if that query might get revectored for an ETL-esque process...
[marinersk]: choroba++

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2017-05-25 15:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?