encoding

Convert hex string to byte array

As indicated in the answers, this is a duplicate of "How do you convert Byte Array to Hexadecimal String, and vice versa, in C#?" Hi, Can we converting a hex string to a byte array using a built-in function in C# or I have to make a custom method for this? ...

How do I determine if an email is Base64 encoded?

I am having difficulty determining if the body of a text email message is base64 encoded. if it is then use this line of code; making use of jython 2.2.1 dirty=base64.decodestring(dirty) else continue as normal. This is the code I have atm. What line of code will allow me to extract this from the email: "Content-Transfer-Encoding...

TextField "umlauts" are not shown on linux

Java 1.5, Linux I do have a screen which contains different textareas and textfields. I do have acess to the application frame, but not to the components inside the frame, because i only get an implementation of an interface. When i try to add german umlauts i see a rectangle in the text component, because the character is not supporte...

decode a quoted printable message in php

I have the string which that encoded in quoted-printable. How do I decode this in php? Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum felis = pede, vestibulum et, ullamcorper in, ultrices eget, metus. Suspendisse in n= ulla. Sed justo. Donec dapibus auctor neque. Pellentesque faucibus ante nec= metus. Vivamus feu...

Encoding problem classic ASP

Hi! have a problem with classic asp. The encoding gets wrong when I send data with XMLHttp.send. The response is an pdf file, but the “ÆØÅ” gets wrong, the “Ø” is read as “øy” for example. It’s like it’s a converting mistake from UTF-8 to ISO-8859-1, but it should be ISO-8859-1 now. I have <%@CODEPAGE="28591"%> at the top at the page...

How to encode a URL in Javascript?

How do you safely encode a URL using Javascript such that it can be put into a GET string? var myUrl = "http://example.com/index.html?param=1&amp;anotherParam=2"; var myOtherUrl = "http://example.com/index.html?url=" + myUrl; I assume that you need to encode the myUrl variable on that second line? ...

Curly quotation marks vs Square quotation marks, what gives?

An interesting problem that no doubt someone here has come across before. I'm reading a CSV file that contains some values wrapped in quotes, I came across a problem today were my app couldn't read the file as the value was wrapped in cury quotation marks and not square quotation marks. Is this an encoding problem? I simply replaced t...

PHP, MSSQL2005 and Codepages

I have a php script which accesses a MSSQL2005 database, reads some data from it and sends the results in a mail. There are special characters in both some column names (I know, it's terrible) and in the fields itself. When I access the script through my browser (webserver iis), the query is executed correctly and the contents of the...

error-page directive in web.xml does not display UTF8 properly

I have an application web.xml with the following entry: <error-page> <error-code>404</error-code> <location>/system_files/error/p_notfound.jsp</location> </error-page> However, when this page is displayed, Japanese characters are garbled. The same page (p_notfound.jsp) displays properly if displayed directly or even through ...

Asp:TextBox and VNI-Times, Vietnamese Text Problem

I need to be able to allow a user to enter Vietnamese text into a text box. I have been instructed to use VNI-Times and provided a sample word document with Vietnamese text. When I paste the text from the sample document into the textbox it is encoded incorrectly. I have tried installing the font (VNI-Times) on both my machine and the ...

UTF8 MySQL problems on Rails - encoding issues with utf8_general_ci

I have a staging Rails site up that's running on MySQL 5.0.32-Debian. On this particular site, all of my tables are using utf8 / utf8_general_ci encoding. Inside that database, I have some data that looks like so: mysql> select * from currency_types limit 1,10; +------+-----------------+---------+ | code | name | symbol | ...

UTF8 problem with MySQL 5

I'm migrating my WordPress blog and phpBB Forum into a new hosting server. I am using phpMyAdmin to import the SQL script from the database in the previous site. When I open the .sql script with Kate, it says it uses UTF8 as encoding. When I import the sql in the new server, I have the option in phpMyAdmin to choose the encoding, where...

need help on how to encode words using huffman code

how do you encode words using the huffman code such as NEED ...

Is there an equivalent of ASF View for MP4 files?

I'm working on our encoding software, and have come across a strange issue where files in a 16:9 aspect ratio are being played in 4:3 in some players, post-transcode from WMV to MP4. Using ASF view I can see that the source WMV file appears to have incorrect data in its BITMAPINFOHEADER structure (it reports that is has 4:3 dimensions bu...

Best Resource for Character Encodings

I'm searching for a document (not printed) that explains in details but still simply the subject of character encoding. ...

I think this is some kind of encoding problem...

I have two computers. Both running WinXP SP2 (I don't really know ho similar they are beyond that). I am running MS Visual C# 2008 express edition on both and that's what I'm currently using to program. I made an application that loads in an XML file and displays the contents in a DataGridView. The first line of my xml file is: <?xm...

How to convert ANSEL text to UTF-8

How to change text encoded in ANSEL to UTF-8 in C#? ...

What is the best collation to use for MySQL (with PHP)

I'm wondering if there is a "best" choice for collation in MySQL for a general website where you aren't 100% of what will be entered? I understand that all the encodings should be the same, such as MySQL, Apache, the HTML and anything inside PHP. In the past I have set PHP to output in "UTF-8", but which collation does this match in MyS...

Email sent in english is displayed to the end user with picture alphabet (Chinese, japanese, etc) and random characters

I have code that sends HTML emails to users. To accommodate users who dont have/ want HTML email, the email contains 2 alternate views, View(0) is HTML, View(1) is Plain text. The HTML view has a header and footer graphics, but the style is done inline and not via css file. The text view is only the text; no tags, images, etc. The mess...

How can I handle a file with multiple encodings in it?

Hello, I have a small program to order and sort email messages, outputting to a textfile using $msg->decoded->string. The perl program outputs to stdout, and I redirect it to a txt file. However, gedit is unable to open this text file because of a character set problem, and I would like to know how to restore or set a character set with...