encoding

How can I encode a stream so that it can be stored in an xml file?

I am working with QuantumGrid 6 from Devexpress. I need to store the grids settings in an xml configuration file. Unfortunately, the grid does not allow XML as a storage option. I can however export the settings to a stream. I'm thinking to export to a stream then convert the stream to text and store it as an xml value. I guess the text...

Change The Character Encoding

Hello, I'm having some problems when i try to save my project in Eclipse. The error is because of the character encoding that is Cp1252 that is because i copyed the file from another that i have created in my Linux computer, then i cant save my file in Eclipse, but how i can solve this problem? But if is needed here is an screenshot of ...

How can I change file encoding of the redirect file in a Windows batch script?

I have the following windows batch command as part of a larger batch file: type *.sql > dbScript.txt ren dbScript.txt dbScript.sql As you can see it joins all SQL scripts in a particular directory into one so that it can be executed during the database build process. My problem is that I now have non ANSI characters in one of the SQL...

Does the img tag's alt attribute require encoding?

In html does the text inside the img tag's alt attribute require encoding/escaping? Non encoded example: <img src="myimg.png" alt="image description" /> Encoded example: <img src="myimg.png" alt="image%20description" /> ...

objective-C string encoding problem...

Ok, I'm fairly new to C sockets but I just need to do some simple sendto() and recvfrom() calls to get a string out across a network, using multicast sockets. After looking around and reading several guides (including Beej's), I found the code below which does the job of listening for messages sent over a multicast socket (which is what ...

How to set the character encoding for a file in VIM

I'm using :set fileencoding=utf-8 and the file is saved correctly, but the next time I open it, I get garbled characters and :set fileencoding? says the option isn't set. From the docs I understand that I shouldn't touch the encoding option. What's the correct way of specifying an encoding for a file in VIM? ...

Smart ASCII string representation

I have an app that converts binary file into ASCII file. With profiler I found that I spend 25% of time doing Encoding.GetBytes() which is called from BinaryWriter.Write(wchar[]). It is completely correct since I have many constructs similar to this one: m_writer.Write("some fancy long text".ToCharArray()); Do you have any smart idea...

osx change file encoding (iconv) recursive

hi, I know I can convert a single file encoding under OSX using: iconv -f ISO-8859-1 -t UTF-8 myfilename.xxx > myfilename-utf8.xxx I have to convert a bunch of files with a specific extension, so I want to convert file encoding from ISO-8859-1 to UTF-8 for all *.ext files in folder /mydisk/myfolder perhaps someobe know the syntax how ...

How can I safely encode a string in Java to use as a filename ?

I'm receiving a string from an external process. I want to use that String to make a filename, and then write to that file. Here's my code snippet to do this: String s = ... // comes from external source File currentFile = new File(System.getProperty("user.home"), s); PrintWriter currentWriter = new PrintWriter(currentFile);...

encoding error in php and google translate

i have a text "Translate text, webpage, or document " which i need to translate into Japanese , the google translator return the string as 翻訳テキスト、 Webページ、またはドキュメント and when am writing that a text file the (ja.po) it looks like –|–óƒeƒLƒXƒgA Webƒy[ƒWA‚Ü‚½‚̓hƒLƒ…ƒƒ“ƒg what would be the error? i am using poeditor.exe to view...

C# Encoding a text string with line breaks

in C# I have a string I am writing to the outputstream of the response. After I save this document and open it in Notepad++ or WordPad I get nicely formatted line breaks where they are intended, when I open this document with the regular old windows notepad, I get one long text string with [] square looking symbols where the line breaks...

Unicode to UTF8 for CSV Files - Python via xlrd

I'm trying to translate an Excel spreadsheet to CSV using the Python xlrd and csv modules, but am getting hung up on encoding issues. Xlrd produces output from Excel in Unicode, and the CSV module requires UTF-8. I imaging that this has nothing to do with the xlrd module: everything works fine outputing to stdout or other outputs that d...

UTF-8 output with CakePHP

Hello! I'm trying to move some Excel-Data to MySQL, but having troubles with encoding. What I did: Data export from OpenOffice 3.1 as csv (utf-8 encoded) Import to phpMyAdmin via file upload (Table encoding: '*utf8_unicode_ci*') In phpMyAdmin's view mode, the data is displayed correctly (it is using utf-8 as charset): <meta http-e...

PHP UTF-16 to ASCII conversion

Consider the following string. Its encoded in UTF-16-LE and saved into a PHP variable. I failed to get either mbstring or iconv to replace the ' with single quote. What would be a good way to sanatize it. String : Carl Sagan&#039;s Cosmic Connection ...

Stream/string/bytearray transformations in Python 3

Python 3 cleans up Python's handling of Unicode strings. I assume as part of this effort, the codecs in Python 3 have become more restrictive, according to the Python 3 documentation compared to the Python 2 documentation. For example, codecs that conceptually convert a bytestream to a different form of bytestream have been removed: b...

Why does anyone use an encoding other than UTF-8?

I want to know why any developer would need to use an encoding other than UTF-8. ...

Character encoding for thai characters

I have a requirement to read a RTF file with thai characters and write it to a text file. I tried using TIS-620, MS874,ISO-8859-11,but thai characters are not displaying properly when i open the resulting output file in notepad or textpad. But it works well with Wordpad. Please guide me. Thanks and Regards, Ramya. Code that solved the ...

How to convert a Net::HTTP response to a certain encoding in Ruby 1.9.1?

I have a Sinatra application (http://analyzethis.espace-technologies.com) that does the following Retrieve an HTML page (via net/http) Create a Nokogiri document from the response.body Extract some info and send it back in the response. The response should be UTF-8 encoded So I came to the problem while trying to read sites that use...

Extra Bytes in File Extracted from SQL Server 2000 Database

I am migrating all my company's customer data to a new CRM system, and the old legacy database is on a SQL Server 2000 server. I can extract all data in the tables via T-SQL queries but run into a brick wall when it comes to file attachments. They are stored as BLOBs in an Image column in the legacy database. After several fruitless exp...

gwt encodedRequest cannot be empt

I am using gwt1.5, struts2, spring and hibernate. I am getting following error: ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/project name] - Exception while dispatching incoming RPC call java.lang.IllegalArgumentException: encodedRequest cannot be empty This error only occurs with IE, but it is working perfect...