![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Multilingual support in generated XML (RSS) >Thread Next - Re: Multilingual support in generated XML (RSS) Re: Multilingual support in generated XML (RSS)To: NULL Date: 11/5/2006 4:31:00 AM
> Function MapBetweenCharSets(rsIn, charsetIn, charsetOut)
>
> Dim oStream : Set oStream =3D CreateObject("ADODB.Stream")
>
> oStream.Type =3D 2 ' Text
> oStream.CharSet =3D charsetIn
> oStream.Open
> oStream.WriteText rsIn
> oStream.Position =3D 0
> oStream.CharSet =3D charsetOut
> MapBetweenCharSets =3D oStream.ReadText
> oStream.close
> End Function
>
> s =3D MapBetweenCharSets("=A3", "ISO-8859-1", "UTF-8")
>
> =A3 is a corruption of the British pound sign. The result of the function
> above restores it.
>
> You usage would be:-
>
> Do Until rs.EOF
> rs("yourfield").value =3D MapBetweenCharSets(rs("yourfield").value ,
> "ISO-8859-8", "UTF-8")
> rs.update
> Loop
>
> Backup your DB first just in case ;)
Thanks, I'll try this conversion.
One more thing I want to make sure - the English characters look OK (in
DB, ASP, XML, etc.). Is it because the conversion using codepage 1255
and/or 65001 (or any other codepage), gives the same results - the
basic ASCII chars?
I want to make sure the only strings that should be converted are the
non-English characters, and not all the DB (big big difference...).
Thanks again,
Gabi.
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
