Help! Character confusion?! A [BUG]?

Avi Bryant avi at beta4.com
Tue Apr 9 23:04:48 UTC 2002


On Tue, 9 Apr 2002, Bob Arning wrote:

> It's a bug, IMHO. The same table is used to translate in both
> directions. Replacing 'ý' with 'y' may be reasonable. Replacing
> a 'y' with 'ý' isn't. Try the change below.

Here's a fuller version, taken from Seaside (not sure if the special
characters in this will copy and paste correctly, though...):

seaEscapeHtml
| stream entities|

entities _ #('' '' '' '' '' '' '' '' '' ' ' '
' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' ' '' '' '' '' ' ' '!!'
'"' '#' '$' '%' '&' '''' '(' ')' '*' '+' ',' '-' '.' '/' '0' '1' '2'
'3' '4' '5' '6' '7' '8' '9' ':' ';' '<' '=' '>' '?' '@' 'A' 'B' 'C'
'D' 'E' 'F' 'G' 'H' 'I' 'J' 'K' 'L' 'M' 'N' 'O' 'P' 'Q' 'R' 'S' 'T' 'U'
'V' 'W' 'X' 'Y' 'Z' '[' '\' ']' '^' '_' '`' 'a' 'b' 'c' 'd' 'e' 'f' 'g'
'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y'
'z' '{' '|' '}' '~' '' 'Ä' 'Å' 'Ç' 'É' 'Ñ'
'Ö' 'Ü' 'á' 'à' 'â' 'ä' 'ã'
'å' 'ç' 'é' 'è' 'ê' 'ë' 'í'
'ì' 'î' 'ï' 'ñ' 'ó' 'ò' 'ô'
'ö' 'õ' 'ú' 'ù' 'û' 'ü' '¹'
'°' '¢' '£' '§' '' '¶' 'ß' '®' '©'
'' '´' '¨' '­' 'Æ' 'Ø' '' '±' '²'
'³' '¥' 'µ' '¦' '·' '¸' ' '
'¼' 'ª' 'º' '½' 'æ' 'ø' '¿'
'¡' '¬' '' '' '' '' '«' '»' '' '¾' 'À'
'Ã' 'Õ' '' '' 'Ð' '' '' '' '' '' '÷' '×'
'ÿ' 'Ý' '' '' '' '' 'Þ' '¤' '' '' '' '' ''
'Â' 'Ê' 'Á' 'Ë' 'È' 'Í' 'Î'
'Ï' 'Ì' 'Ó' 'Ô' 'ð' 'Ò' 'Ú'
'Û' 'Ù' '?' '' '' '' '' '' '' '' 'ý' 'þ'
'&hibar;').

^ String streamContents:
	[:stream |
	self do: [:c |stream nextPutAll: (entities at: c asciiValue + 1)]]! !




More information about the Squeak-dev mailing list