What is the best way to verify/test that a text string is serialized to a byte array with a certain encoding?
In my case, I want to verify that an XML structure is serialized to a byte array with the UTF-8 encoding which is of variable character length. As an example, my current ugly procedure is to inject a character known to require t...
Hi!
Inside an asp.net page, shoul I use
<html><title>My page's title from México</title></html>
Or
<html><title>My page's title from México</title></html>
Both examples have same output. Since asp.net encodes all my pages to utf-8 there is no need to use html entities, is that right?
Thanks a lot.
...
This is driving me crazy.
I have this one php file on a test server at work which does not work.. I kept deleting stuff from it till it became
<?
print 'Hello';
?>
it outputs
Hello
if I create a new file and copy / paste the same script to it it works!
Why does this one file give me the strange characters all the time?
...
Is there any easy/general way to clean an XML based data source prior to using it in an XmlReader so that I can gracefully consume XML data that is non-conformant to the hexadecimal character restrictions placed on XML?
Note:
The solution needs to handle XML
data sources that use character
encodings other than UTF-8, e.g. by
specifyi...
In Ruby 1.8 and earlier,
Foo
is a constant (a Class, a Module, or another constant). Whereas
foo
is a variable. The key difference is as follows:
module Foo
bar = 7
BAZ = 8
end
Foo::BAZ
# => 8
Foo::bar
# NoMethodError: undefined method 'bar' for Foo:Module
That's all well and good, but Ruby 1.9 allows UTF-8 source code. ...
If all you see is the ugly no-char boxes, what tools or strategies do you use to figure out what went wrong?
(The specific scenario I'm facing is no-char boxes within a <select> when it should be showing Japanese chars.)
...
I am having problems submitting forms which contain UTF-8 strings with Ajax. I am developing a Struts web application which runs in a tomcat server. This is the environment i set up to work with UTF-8:
I have added to tomcat's conf/server.xml the attributes URIEncoding="UTF-8" useBodyEncodingForURI="true" into the Connector tag.
I have...
A few months back I was tasked with implementing a unique and random code for our web application. The code would have to be user friendly and as small as possible, but still be essentially random (so users couldn't easily predict the next code in the sequence).
It ended up generating values that looked something like this:
Af3nT5Xf2
...
I am building an open search add-on for Firefox/IE and the image needs to be Base64 Encoded so how can I base 64 encode the favicon I have?
I am only familiar with PHP
...
When using the php include function the include is succesfully executed, but it is also outputting a char before the output of the include is outputted, the char is of hex value 3F and I have no idea where it is coming from, although it seems to happen with every include.
At first I thbought it was file encoding, but this doesn't seem ...
How to encode video on the fly and send it trough the network from C#?
Can't find a suitable library. I need to encode in WMV and don't mind if the actual encoding is made in C++ as long as the library has a .NET assembly available.
Thanks
...
On JavaFX's Wikipedia
In May 2008 (...) Sun Also announced a
multi-year agreement with On2
Technologies to bring comprehensive
video capabilities to the JavaFX
product family using the company's
TrueMotion Video codec.
Do you know if it will include encoding capabilities for webcam video like Flash or just playback/stre...
Greetings!
I have a web service (ASMX) and in it, a web method that does some work and throws an exception if the input wasn't valid.
[ScriptMethod]
[WebMethod]
public string MyWebMethod(string input)
{
string l_returnVal;
if (!ValidInput(input))
{
string l_errMsg = System.Web.HttpUtility.HtmlEncode(GetErrorMessage...
I have a JUnit test that tests adding Strings to a Dictionary custom type. Everything works fine for everyone else on a Linux/Windows machine, however, being the first dev in my shop on a mac, this unit test fails for me. The offending lines are where unicode string literals are used:
dict.add( "Su字/会意pin", "Su字/会意pin" );
dict...
I have 28,000 images I need to convert into a movie.
I tried
mencoder mf://*.jpg -mf w=640:h=480:fps=30:type=jpg -ovc lavc -lavcopts vcodec=msmpeg4v2 -nosound -o ../output-msmpeg4v2.avi
But it seems to crap out at 7500 frames.
The files are named
webcam_2007-04-16_070804.jpg
webcam_2007-04-16_071004.jpg
webcam_2007-04-16_071204.jpg
...
When encoding a query string to be sent to a web server - what is the best practice to use from javascript:
Use escape:
escape("% +&=");
OR
use encodeURI() / encodeURIComponent()
encodeURI("http://www.google.com?var1=value1&var2=value2");
encodeURIComponent("var1=value1&var2=value2");
...
I have a file saved as UCS-2 Little Endian I want to change the encoding so I ran the following code:
cat tmp.log -encoding UTF8 > new.log
The resulting file is still in UCS-2 Little Endian. Is this because the pipeline is always in that format? Is there an easy way to pipe this to a new file as UTF8?
...
Flex uses by default UTF-8. I have not fount a way to specify a different encoding/charset on the actionscript WebService class.
Thanks in advance for your help
...
I want to run text through a filter to ensure it is all UTF-8 encoded. What is the recommended way to do this with PHP?
...
Argghh. I have a site that offers audio previews of songs hosted elsewhere. Some file names have an ampersand in them - see below where it passes "soundFile." Anytime there's an ampersand, Flash can't get the file - I think it drops the filename after the ampersand. It doesn't matter if I pass it as an "&" or an HTML entity ("& a m p ;")...