![]() |
|
|
|||||||
![]() |
DotNet - encoding relating to code page |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hello,
when i query some strings which were updated into database in a way like "Update tablename set columnname = N'xxxxx' " from Sql Server 2005 . The string consists of mixed DBCS and SBCS.Then encoding the string into Quoted-Printable used in vCalendar.Before encoding, i GetBytes() as follows: string _ToEncode = "????? ?? ??²âÊÔÖ÷°ì³ÇÊвâÊÔÖйúÖ÷°ì³ÇÊÐhello, world!"; byte[] bytes = Encoding.UTF8.GetBytes(_ToEncode); //or Encoding.UTF16.GetBytes(_ToEncode); Then encoding byte by byte formerly got, only to get some garble string. If string without DBCS,encoding is correct,no garble happens. my environment is :ASP.NET 2.0,Intel x86, code page is Chinese Simplified (GB2312) Maybe this is related to code page,but i am not sure! What's causing ?Thanks in advance! Peng-fei Bai |
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| .aspx page apears minimized when pops up | sam.dev | Software | 3 | 02-04-2008 03:04 PM |
| Back button doesn't work when it is a secure page returning to a non secure page | Miss Mary | General Help Related Topics | 1 | 09-21-2007 10:32 AM |
| master page & app_theme folder doesn't work | dummies2 | General Help Related Topics | 0 | 09-04-2007 05:41 PM |
| Clear the Session value on page unload | tessythampan | Software | 1 | 08-12-2006 12:18 PM |
| ProCoder 2 DVD tutorial with Ben Waggoner... | DSL.net News | DVD Video | 1 | 09-17-2004 06:30 AM |