For Programmers: Free Programming Magazines  


Home > Archive > ASP > June 2005 > problem with charsets









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author problem with charsets
b.Wurm

2005-06-06, 3:55 pm

hello newsgroup!

I've got a from a user entered string that looks like that:

halČsdldfj

now I want to send a Textmail with this string as bodytext. Therefore I've
to convert the Č to the correct sign (C).
How can I convert this sign and add it to a mail with the correct charset.

At this Example it is a Czech sign. So I tried to set:

Session.CodePage = 28592
Session.LCID = 11274
Response.CharSet = "iso-8859-2"

iStart = 1
Do While iStart > 0
iStart = Instr(iStart, sReturn, "&#")
If iStart > 0 Then
iEnd = Instr(iStart, sReturn, ";")

If iEnd > 0 Then
sVal = Mid(sReturn, iStart + 2, iEnd - iStart - 2 )
sReturn = Replace(sReturn, "&#" & sVal & ";", ChrW(sVal))
iStart = Instr(1, sReturn, "&#")
Else
iStart = 0
End If
End If

Loop


but it doesn't work correct! There only is an normal C and not a C

can anybody help me please?!

thx
b.wurm


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com