encoding

Xml Escaping/Encoding terminology

I'm confused as for the difference between the terms "escaping" and "encoding" in phrases like: Xml Encoding Xml Escaping Encoded Html Escaped Url ... Can anyone explain it to me? ...

Maple and substrings

Maybe this is the wrong website to ask, but hopefully somebody knows... How do I break a string in Maple and store it in a list of substrings? i.e. my string is : "i love the weekends" and I want to break it into substrings of size 2... so i would look like this substrs; substrs = [[i ][lo][ve][ t][he][ w][ee][ke][nd][s ]] ...

not having to encode url

Say I have this url "/my#stuff" I am using asp.net mvc and when I try to goto this page it takes me to just "/my". The "#stuff" part has been removed. Now I can get it to work fine if I encode the URL like so "/my%23stuff" since %23 decodes to # However, is there a way I can get this to work without having to encode the url? I'd like...

Viterbi decoder

Hi, Does anyone know for any good resource on the web or book where the explanation for Viterbi decoder or a tutorial on how to decode a received bit sequence by using trellis diagram could be found? Thanks! ...

XML encoding issue

Hello everyone, I want to know whether there is quick way to find whether an XML document is correctly encoded in UTF-8 and does not contains any characters which is not allowed in XML UTF-8 encoding. <?xml version="1.0" encoding="utf-8"?> thanks in advance, George EDIT1: here is the content of my XML file, in both text form and in ...

C#: Unicode from a string with MySQL

I'm trying to insert a string into a MySQL database. I can insert it by running the query on the server, but when I try to use my C# source file to insert "Iñtërnâtiônàlizætiøn", I get "Iñtërnâtiônàlizætiøn". I've tried adding it as a parameter and adding ;charset=utf8 to my connection string, but no look. The table in the databas...

How does a file with Chinese characters know how many bytes to use per character?

I have read Joel's article "The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)" but still don't understand all the details. An example will illustrate my issues. Look at this file below: I have opened the file in a binary editor to closely examine the last of t...

How expensive is java's string encoding conversion?

I was wondering how expensive Java's string encoding conversion algorithms are, say, for a piece of text is in EBCDIC that needs to be converted to UTF-16, or for a similar conversion of a large file. Are there any benchmarks on the cost of this conversion? Benchmarks for multiple encodings would be better. ...

Are digits represented in sequence in all text encodings?

This question is language agnostic but is inspired by these c/c++ questions. How to convert a single char into an int Char to int conversion in C Is it safe to assume that the characters for digits (0123456789) appear contigiously in all text encodings? i.e. is it safe to assume that '9'-'8' = 1 '9'-'7' = 2 ... '9'-'0' = 9 in all...

How do I get SQL Server 2005 data stored as windows-1252 as UTF-8?

I have a client database with English and French data in windows-1252 encoding. I need to fetch this data as part of an AJAX call and send it in UTF-8 format. Is there a way I can pass the data through a stored proc to perform this conversion? My web app cannot be altered to perform this conversion itself. ...

HTML.Encode localization with ASP.NET MVC

How can I escape localized string encoding: <%= Html.Encode("ÆØÅ") %> from rendering &#198;&#216;&#197; is there another way to encode localized strings? ...

Encoding video files in different formats

Hi guys, I am working on a site which would allow users to upload a video and my site would encode into 3 formats, wmv, iPod and zune. Are there any 3rd party tools/API's that can be used to do this? I am not sure how sites like http://channel9.msdn.com/ , http://www.hanselman.com/blog/ have got this. ...

Encode NSString for XML/HTML

Is there a way to HTML encode a string (NSString) in objective-c, something along the lines of Server.HtmlEncode in .NET? Thanks! ...

How to find encoding of a file in Unix via script(s)

Hi, I need to find the encoding of all files that are placed in a directory. Is there a way to find the encoding used? The file command is not able to do this. The encoding that is of interest to me is:ISO-8859-1. If the encoding is anythign else i want to move the file to another directory. Appreciate any assistance, Thanks, Manglu...

Getting U+fffd/65533 instead of special character from Query String

Hi, I have a C# .net web project that have a globalization tag set to: <globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="nb-no" uiCulture="no"/> When this URL a Flash application (you get the same problem when you enter the URL manually in a browser): c_product_search.aspx?search=kjøkken (alternatively: c_prod...

Is this the correct way to send email with PHP?

I'm a bit worried if this function sends emails that can be recognized correctly on the majority of email and webmail clients the way it should, specifically I'm most concerned about this doubts: Are the UTF-8 declarations and attachments well formed? Do I need to use quoted_printable_decode()? If yes, where? Content-Transfer-Encoding:...

What codepage/charset should be used to interpret data coming from an MVS system into a Java Environment?

I've come into an interesting problem (as is often the case in interacting with legacy systems). I'm working on an application (which currently runs on a x86 Linux or Windows system) that can receive requests from a variety of systems, one of them being an MVS system. I am attempting to determine which codepage/charset I should be us...

Python and working with encodings

Hello, can you show me library for python which can detect (or decode - not nessecary) encoding of the string. I found chardet but it's not that what i need. Thanks. ...

Best way for Parsing ANSI and UTF-16LE files using Python 2/3?

I have a collection of files encoded in ANSI or UTF-16LE. I would like python to open the files using the correct encoding. The problem is that the ANSI files do not raise any sort of exception when encoded using UTF-16le and vice versa. Is there a straightforward way to open up the files using the correct file encoding? ...

XMLReader encoding error

I have a PHP script which is trying to parse a huge XML file. To do this I'm using the XMLReader library. During the parsing, I have this encoding error: Input is not proper UTF-8, indicate encoding ! Bytes: 0xA0 0x32 0x36 0x30 I would like to know if they are a way to skip records with bad characters. Thanks! ...