The notes side on save validates some fields. We look at the decimal value of the ascii char and replace some of them with the HTML-number equivalent.
In some fields we translates chars like Ö → Ö and @ → @
This way we know that the web presentation will work no matter what. We manage chinese, japanese, arabic, english, spanish and many other language charset and it is published nicely on the web.
Now we have come up with a problem on the norwegian computers and we are really confused! Our validation transforms y → ü and Ø → Ö.
So, we did a test and wrote a simple check…
These are the “banned” chars we need to transform:
Const listchars1=|@Char(32) : @Char(44) : @Char(59) : @Char(58) : @Char(42) : @Char(37) : @Char(38) : @Char(47) : @Char(92) : @Char(40) : @Char(41) : @Char(64) : @Char(35) : @Char(34) : @Char(33) : @Char(123) : @Char(125) : @Char(91) : @Char(93) : @Char(43) : @Char(63) : @Char(239) : @Char(96) : @Char(61) : @Char(156) : @Char(36) : @Char(94) : @Char(126) : @Char(39) : @Char(46) : @Char(249) : @Char(13) : @Char(134) : @Char(143) : @Char(132) : @Char(142) : @Char(148) : @Char(153) : @Char(129) : @Char(154) : @Char(225) : @Char(168) : @Char(183) : @Char(181) : @Char(182) : @Char(199) : @Char(128) : @Char(212) : @Char(144) : @Char(210) : @Char(211) : @Char(222) : @Char(214) : @Char(215) : @Char(216) : @Char(165) : @Char(227) : @Char(224) : @Char(226) : @Char(229) : @Char(235) : @Char(233) : @Char(234) : @Char(237) : @Char(133) : @Char(160) : @Char(131) : @Char(198) : @Char(145) : @Char(138) : @Char(130) : @Char(136) : @Char(137) : @Char(141) : @Char(161) : @Char(140) : @Char(139) : @Char(241)|
Const listchars2="@Char(208) : @Char(149) : @Char(162) : @Char(147) : @Char(228) : @Char(155) : @Char(151) : @Char(163) : @Char(150) : @Char(236) : @Char(152) : @Char(146) : @Char(157)"
Then we check in a loop of the input text and IF we have a match of the char in the list above… we send that to a messagebox.
Cstr(Asc(Mid(inString,charPos,1)))
When I run the code that takes the input text and parses against these @chars I get the normal alerts for the correct transformation… We have tested on different users and different languages… we all type in the character y on the keybord and we see that it translates to ascii 121 and life is fine. It is NOT in the ban list.
When a norwegien user puts a y in the inString it will also translate it, using the Asc() function to ascii decimal 121 BUT now the thing we can’t understand happens.
Even if it is ascii decimal 121 is given to us, the validation code will match that then to @Char(153) and that is an illegal char for us.
And this is ONLY happening on the norwegian clients…
Any help would be much appreciated since we are clueless for now.