I'm trying to narrow down some weirdness going on with my AJAX calls. My PHP scripts have this at the start:
ob_start("ob_gzhandler");
Works great with HTML. But are there any problems with doing it with application/json data? Any browser issues anyone is aware of?
...
The padding char for the official base64 is '=', which might need to be percent-encoded when used in a URL. I'm trying to find the best padding char so that my encoded string can be both url safe (I'll be using the encoded string as parameter value, such as id=encodedString) AND filename safe (I'll be using the encoded string directly as...
In my asp.net mvc application I created the following link:
http://localhost:2689/en/Formula.mvc/351702++LYS+GRONN+5G+9%252f2++fds
I get error 400 (bad request).
I think it blocks at the %25 (forward slash).
What am I doing wrong?
--EDIT 3--
I tried not encoding anything at all but rather rely on the default encoding of Url.Rou...
Let's say I have a TextBox and the user puts some data in it. I then send the data over RPC, with something like this (synchronous version of interface)
public void submitText(String userData) {
dao.saveText(userData);
}
My questions are:
What is the encoding of the userData? This is a trick question, since Strings in java are sto...
Lately I have been seeing an increasing number of design articles encouraging the use of typographic quotes (Curly Quotes) for use in web pages over straight quotes.
While I agree typographically, that correct quotes are that much more appealing and add a nice touch to a design, I wonder if it is actually better practice from an encodi...
How do I get the encoding that is used for the string returned by GetUserName from the win32 API? I'm using pywin32 and it returns an 8-bit string. On my German XP, this string is obviously encoded using Latin-1, but this might not be the case for other Windows installations.
I could use GetUserNameW, but I would have to wrap that mysel...
I prepare currently for my MCTS and learned something about the function of EncoderReplacementFallback and DecoderReplacementFallback. I understand the functionality, but i'm not able to identify a real world scenario, where someone would use this!
Do you know one?
...
My study guide (for 70-536 exam) says this twice in the text and encoding chapter, which is right after the IO chapter.
All the examples so far are to do with simple file access using FileStream and StreamWriter.
It aslo says stuff like "If you don't know what encoding to use when you create a file, don't specify one and .NET will use ...
Hi,
I am trying to display some images containing special characters like ☻ ☺ ♥ or Chinese or Arabic characters in their names using jsp...but the images are not getting displayed !!
<img src = "pipo².jpg" />
<img src = "pip☺☻♥o².jpg" />
What am I doing wrong !!
...
Hello. How can one set character encoding on external JavaScript files using only Websphere (5.1)? I don't have Apache in front of it so I can't set it using "AddCharset UTF-8 .js".
Or maybe there is some other way to force it on a web container via web.xml or similar magic?
...
Hi,
I'm trying to get some legacy code to display Chinese characters properly. One character encoding I'm trying to work with starts with a 0x7F and is 4 bytes long (including the 0x7F byte). Does anyone know what kind of encoding this is and where I can find information for it? Thanks..
UPDATE:
I've also had to work with some Japane...
I'm having a stupid problem. I'm reading some .cs files from disk.
Doing lots of regex and other operations on them with a .net program i've made.
Then write them back to disc.
The resulting files get the wrong encoding somehow. What encoding are c# source files? And then there is the first byte-order thing, is that needed?
Does it get...
I've written a program which opens a bmp file and treats it as a character file and performs run length encoding on it. It produces a valid compressed encoding file, which I read again to perform the decoding.
When i'd made the application i was using Fedora and it ran perfectly fine. Now i'm running it on ubuntu and it refuses to work....
Anyone have a neat trick on how to convert a number of php and html files from UTF-8 to ISO-8859-1 in linux (Ubuntu)?
...
I'm using the StreamReader class in .NET like this:
using( StreamReader reader = new StreamReader( "c:\somefile.html", true ) {
string filetext = reader.ReadToEnd();
}
This works fine when the file has a BOM. I ran into trouble with a file with no BOM .. basically I got gibberish. When I specified Encoding.Unicode it worked fine...
I tried to use java.io.FileReader to read some text files and convert them into a string, but I found the result is wrong encoded and not readable at all.
Here's my environment:
Windows 2003, OS encoding: CP1252
Java 5.0
My files are UTF-8 encoded or CP1252 encoded, and some of them (UTF-8 encoded files) may contain Chinese (non-La...
I am searching for a way to setup Visual Studio so it always saves my files in UTF-8.
I have only found options to set this project wide is there a way to set it Visual Studio wide?
...
whatis the difference between Unicode, UTF8, UTF7,UTF16,UTF32,ASCII, ANSI code format of encoding in ASP.net
In what these are helpful for programmers.
...
I have some UTF-8 HTML templates in my Eclipse project and Eclipse keeps treating them as if they had a different encoding. It says the encoding is "determined from content". I want to force the correct encoding.
I can force it for a single file but setting an encoding for the parent folder won't affect the files in it because instead o...
Hi,
I have a python (2.5.4) script which I run in cygwin (in a DOS box on Windows XP). I want to include a pound sign (£) in the output. If I do so, I get this error:
SyntaxError: Non-ASCII character '\xa3' in file dbscan.py on line 253, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
OK. So I looke...