Double Byte Character Set

Results 1 to 2 of 2

Thread: Double Byte Character Set

  1. #1
    Join Date
    Dec 1969

    Default Double Byte Character Set

    unanswered on asp Q&A<BR><BR>hi, <BR><BR>I am creating an ASP application where the users want to be able to input chinese characters into forms. I am having some problems with the double byte character set and was hoping someone knew of a good resource site or could provide some help. <BR><BR>My problems... <BR><BR>1. how do I check the length of a string entered into a field? <BR>[when len() with 1 chinese character it returns a value of 8 <BR>using left() with values other than multiples of 8 produces strange results] <BR><BR>2. Using Server.HTMLEncode on the DBCS corrupts the characters.

  2. #2
    Join Date
    Dec 1969

    Default You have to set LCID and...

    ...CodePage to match Chinese!<BR><BR>&#060;%<BR>Session.LCID = 936 &#039; for Chinese Simplified encoding<BR>Session.LCID = 950 &#039; for Chinese Traditional, Big 5<BR>%&#062;<BR>[There are other possibilities for other more unusual Chinese encodings. See this page:<BR><BR><BR>For the LCID (LoCale IDentifier), see here:<BR><BR><BR>&#060;%<BR>Session.LCID = 2052 &#039; China<BR>Session.LCID = 3076 &#039; Hong Kong<BR>Session.LCID = 1028 &#039; <BR>%&#062;<BR>Again, there are other possibilities. See the chart.<BR><BR>**************<BR><BR>If you don&#039;t set these correctly--and if your users don&#039;t choose a *matching* encoding in their browser!--you will get the kinds of problems you noted.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts