PC Review


Reply
Thread Tools Rate Thread

Check if string observes specific encoding/codepage

 
 
John Hansen
Guest
Posts: n/a
 
      12th Mar 2009
I have got an input string from a webservice, and I want to make sure, that
all characters in that string are defined in a specific encoding/codepage
(Windows-1252 in my case).
Is there an easy way to verify that all chars in a string are "allowed"
chars with regards to a certain codepage?

Thanks,
John


 
Reply With Quote
 
 
 
 
Pavel Minaev
Guest
Posts: n/a
 
      12th Mar 2009
On Mar 12, 4:00*am, "John Hansen" <x...@hotmail.com> wrote:
> I have got an input string from a webservice, and I want to make sure, that
> all characters in that string are defined in a specific encoding/codepage
> (Windows-1252 in my case).
> Is there an easy way to verify that all chars in a string are "allowed"
> chars with regards to a certain codepage?


Have a look at System.Text.Encoding.EncoderFallback.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how does ado.net SqlDataReader.GetString() know which encoding to read the data into a string as? Does sql sever set this at the column data type level, server wide encoding setting, os encoding? Daniel Microsoft C# .NET 1 25th Mar 2007 05:47 PM
how does ado.net SqlDataReader.GetString() know which encoding to read the data into a string as? Does sql sever set this at the column data type level, server wide encoding setting, os encoding? Daniel Microsoft ADO .NET 0 7th Mar 2007 11:15 PM
how does ado.net SqlDataReader.GetString() know which encoding to read the data into a string as? Does sql sever set this at the column data type level, server wide encoding setting, os encoding? Daniel Microsoft Dot NET 0 7th Mar 2007 11:12 PM
Encoding/Codepage: Can't Get There From Here Christopher H. Laco Microsoft Dot NET 10 5th Apr 2005 09:11 PM
generate text file with other codepage or encoding fabian Microsoft VB .NET 3 21st Jan 2005 07:52 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:32 AM.