473,804 Members | 3,797 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

character encoding

Hi,

Is there a way to encode "?????????? ? ??????????"
to "¶ÒÁ¹Ô´¹Ö§¤ Ð µÃ§·Õèà»ç¹" and vice versa.
Thanks
Apr 23 '07 #1
3 3878
LiMBi wrote:
Hi,

Is there a way to encode "?????????? ? ??????????"
to "¶ÒÁ¹Ô´¹Ö§¤ Ð µÃ§·Õèà»ç¹" and vice versa.
Thanks
You have to be more specific. What you are asking for is impossible. A
string of only question marks and spaces can not hold the same amount of
information as a string of random characters of the same length.

I assume that what you really want to know is how to do encoding and
decoding so that you don't lose characters in the process. To answer
that you have to tell a little more about what you are doing, and what
encoding you are trying to use.

--
Göran Andersson
_____
http://www.guffa.com
Apr 23 '07 #2
LiMBiZ wrote:
I am sorry, for that. Actualy it is thai character, but when i post it
convert to question mark. I used to encode it with code page "windows-874"
from MySQL connection.

See attached file.

Thanks
LiM
The encoding is named "windows-874", not "window-874". If that's not the
error, you have probably made some other mistake along the way.

What encoding did you use to decode the text after you encoded it?
"Göran Andersson" <gu***@guffa.co mwrote in message
news:eI******** ******@TK2MSFTN GP02.phx.gbl...
>LiMBi wrote:
>>Hi,

Is there a way to encode "?????????? ? ??????????"
to "¶ÒÁ¹Ô´¹Ö§¤ Ð µÃ§·Õèà»ç¹" and vice versa.
Thanks
You have to be more specific. What you are asking for is impossible. A
string of only question marks and spaces can not hold the same amount of
information as a string of random characters of the same length.

I assume that what you really want to know is how to do encoding and
decoding so that you don't lose characters in the process. To answer
that you have to tell a little more about what you are doing, and what
encoding you are trying to use.

--
Göran Andersson
_____
http://www.guffa.com

--
Göran Andersson
_____
http://www.guffa.com
Apr 24 '07 #3
Actualy, ByteFX.MySqlCli ent name space will control encoding stuff.

Connection = New MySqlConnection (ConString, Encoding.GetEnc oding(874))

By using this connection, it encode from Thai script to Character when I
insert or update record and encode from Character to Thai script back to
display in textbox. It works fine.

But I want to encode the string with Thai script to character as in attached
file. And vice versa.

Any idea how to do that?

"Göran Andersson" <gu***@guffa.co mwrote in message
news:ui******** ******@TK2MSFTN GP04.phx.gbl...
LiMBiZ wrote:
>I am sorry, for that. Actualy it is thai character, but when i post it
convert to question mark. I used to encode it with code page
"windows-874" from MySQL connection.

See attached file.

Thanks
LiM

The encoding is named "windows-874", not "window-874". If that's not the
error, you have probably made some other mistake along the way.

What encoding did you use to decode the text after you encoded it?
>"Göran Andersson" <gu***@guffa.co mwrote in message
news:eI******* *******@TK2MSFT NGP02.phx.gbl.. .
>>LiMBi wrote:
Hi,

Is there a way to encode "?????????? ? ??????????"
to "¶ÒÁ¹Ô´¹Ö§¤ Ð µÃ§·Õèà»ç¹" and vice versa.
Thanks

You have to be more specific. What you are asking for is impossible. A
string of only question marks and spaces can not hold the same amount of
information as a string of random characters of the same length.

I assume that what you really want to know is how to do encoding and
decoding so that you don't lose characters in the process. To answer
that you have to tell a little more about what you are doing, and what
encoding you are trying to use.

--
Göran Andersson
_____
http://www.guffa.com


--
Göran Andersson
_____
http://www.guffa.com

Apr 25 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
8162
by: Safalra | last post by:
The idea here is relatively simple: a java program (I'm using JDK1.4 if that makes a difference) that loads an HTML file, removes invalid characters (or replaces them in the case of common ones like Microsoft's 'smartquotes'), and outputs the file. The problem is these files will be on disk, so the program won't have the character encoding information from the server. Questions:
7
4976
by: Mark | last post by:
Hi... I've been doing a lot of work both creating and consuming web services, and I notice there seems to be a discontinuity between a number of the different cogs in the wheel centering around windows-1252 and that it is not equivalent to iso-8859-1. Looking in the registry under HKEY_CLASSES_ROOT\MIME\Database\Charset and \Codepage, it seems that all variations on iso-8859-1 (latin1, etc) are mapped to code page 1252, which I'm...
6
2511
by: Pavils Jurjans | last post by:
Hello, I am experiencing a weird behaviour on my ASP.NET project. The project consists from client-side, which can be whatever environment - web page, EXE application, etc. The client sends HTTP POST request to the server with data, and the server has ASP.NET application that handles the request and gives answer. I have biled all the fat code down to a very simple test case, which consists from three files - HTML page, which does...
18
4637
by: james | last post by:
Hi, I am loading a CSV file ( Comma Seperated Value) into a Richtext box. I have a routine that splits the data up when it hits the "," and then copies the results into a listbox. The data also has some different characters in it that I am trying to remove. The small a with two dots over it and the small y with two dots over it. Here is my code so far to remove the small y: Private Sub Button2_Click(ByVal sender As System.Object, ByVal...
8
11890
by: Brand Bogard | last post by:
Does the C standard include a library function to convert an 8 bit character string to a 16 bit character string?
37
3385
by: Zhiv Kurilka | last post by:
Hi, I have a text file with following content: "((^)|(.* +))§§§§§§§§" if I read it with: k=System.IO.StreamReader( "file.txt",System.Text.Encoding.ASCII); k.readtotheend()
44
9501
by: Kulgan | last post by:
Hi I am struggling to find definitive information on how IE 5.5, 6 and 7 handle character input (I am happy with the display of text). I have two main questions: 1. Does IE automaticall convert text input in HTML forms from the
5
4899
by: Timothy Madden | last post by:
Hello Is there a function that will allow me to output text written in utf-8 (from db for example) if my document has Content-Type: text/html; charset=ISO-8859-1 I mean htmlspecialchars() and htmlentities() will only convert characters that have an associated entity defined in HTML.
17
10711
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, Wide character and multi-byte character are two popular encoding schemes on Windows. And wide character is using unicode encoding scheme. But each time I feel confused when talking with another team -- codepage -- at the same time. I am more confused when I saw sometimes we need codepage parameter for wide character conversion, and sometimes we do not need for conversion. Here are two examples,
10
3983
by: Paul W | last post by:
Hi all, I have an application that reads data in from a text file and stores it in a database. My problem is that there are some characters in the file that aren't being handled properly. For instance, one of the characters has an ASCII code of 150 (it looks like a dash '-'), when I'm debugging this character is displayed as the square box that Windows uses for unsupported characters and when it's copied to the database it's stored as...
0
9710
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10593
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10329
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9163
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7626
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4304
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.