Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

smoke Xarn everyday

Name: Anonymous 2010-06-23 2:51

Name: Anonymous 2010-06-28 3:03

>>69
there's no reason not to make all strings unicode, or at least handle the conversions automatically.

Name: Anonymous 2010-06-28 3:17

>>72
it's fairly easy to write code that can identify any encodings that are still in widespread use.

Name: Anonymous 2010-06-28 4:11

>>74
[/code]if string is not valid utf8 or ascii
  if string is valid shift_jis
    convert string from shift_jis to utf8
  else convert string from iso 8859-1 to utf8
return string[/code]

Name: Anonymous 2010-06-28 5:13

>>79
it's trivial to determine if a particular byte sequence is not valid ascii (any bytes with 8th bit set), utf8 (any bytes with 8th bit set that aren't part of a valid utf8 multibyte character), or shift_jis (any bytes other than 00-0F,A1-DF that aren't part of a valid shift_jis double-byte character). no magic necessary.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List