encoding

What function was used to code these passwords in AFX?

I am trying to work out the format of a password file which is used by a LOGIN DLL of which the source cannot be found. The admin tool was written in AFX, so I hope that it perhaps gives a clue as to the algorithm used to encode the passwords. Using the admin tool, we have two passwords that are encoded. The first is "dinosaur123456789"...

JavaScript Endian Encoding?

A response on SO got me thinking, does JavaScript guarantee a certain endian encoding across OSs and browsers? Or put another way are bitwise shifts on integers "safe" in JavaScript? ...

Encoding issue with symfony framework, using Postgres as the database

I'm using symfony framework, and my db is Postgres. I export data from my tables into XML format. The european characters (those with umlaut) are messed up, inspite of using UTF-8 encoding. Any suggestions on how to fix this? ...

What charset does Microsoft Excel use when saving files?

I have a Java app which reads CSV files which have been created in Excel (e.g. 2007). Does anyone know what charset MS Excel uses to save these files in? I would have guessed either: windows-1255 (Cp1255) ISO-8859-1 UTF8 but I am unable to decode extended chars (e.g. french accentuated letters) using either of these charset types. ...

Newline characters in non ASCII encoded files

I'm using Python 2.6 to read latin2 encoded file with windows line endings ('\r\n'). import codecs file = codecs.open('stackoverflow_secrets.txt', encoding='latin2', mode='rt') line = file.readline() print(repr(line)) outputs : u'login: yabcok\n' file = codecs.open('stackoverflow_secrets.txt', encoding='latin2', mode='r') line = fil...

UrlEncode - Javascript vs. C#

I have a URL which requires some parameters. The values of those parameters can be accented characters, so I absolutely need to UrlEncode them. Strangely, I see a difference between the behavior or Javascript and .NET. Let's pretend I try to UrlEncode the word "éléphant". In JavaScript (according to this WebSite: http://www.albionresear...

encoding discrepancy between "main" page and dojo dialog

I have a strange encoding situation, whereby the html page itself displays as it should (with all the accénted chäracters properly displayed), but all the popup dojo dialogs fail to use the correct encoding. Here is the setup: Java web project with Hibernate/Spring/Struts2 running on Tomcat6.0.18; the pages are generated as JSP tiles,...

Linux & C-Programming: How can I write utf-8 encoded text to a file?

I am interested in writing utf-8 encoded strings to a file. I did this with low level functions open() and write(). In the first place I set the locale to a utf-8 aware character set with setlocale("LC_ALL", "de_DE.utf8"). But the resulting file does not contain utf-8 characters, only iso8859 encoded umlauts. What am I doing wrong? Add...

VS 2008 Encoding and MSBuild Exec Task

I have a msbuild exec task that calls a cmd file to setup my database. I am using the msbuild exec task like this: <Exec Command="$(SqlFolder)\Setup\SetupDatabase.cmd $(DBServer) MyDB $(SqlCmdRunner)" IgnoreExitCode="False"> <Output TaskParameter="ExitCode" ItemName="DBSetupExitCode"/> </Exec> In the setup cmd, it uses osql t...

How do I replace special characters in a URL?

This is probably very simple, but I simply cannot find the answer myself :( Basicaly, what I want is, given this string: "http://www.google.com/search?hl=en&amp;q=c# objects" I want this output: http://www.google.com/search?hl=en&amp;q=c%23+objects I'm sure there's some helper class somewhere buried in the Framework that takes care...

How can I determine the content type of a file in .NET?

I'm given a filename and I have to be able to read it from disk and send its contents over a network. I need to be able to determine whether the file is text or binary so I know whether to use a StreamReader or BinaryReader. Another reason why I need to know the content type is because if it is binary, I have to MIME encode the data be...

How do I determine file encoding in OSX?

I'm trying to enter some UTF-8 characters into a LaTeX file in TextMate (which says its default encoding is UTF-8), but LaTeX doesn't seem to understand them. Running cat my_file.tex shows the characters properly in Terminal. Running ls -al shows something I've never seen before: an "@" by the file listing: -rw-r--r--@ 1 me user...

Deciphering MMORPG Protocol Encoding

I plan on writing an automated bot for a game. The tricky part is figuring out how they encoded their protocol... To make the bot run around is easy, simply make the character run and record what it does in wireshark. However, interpreting the environment is more difficult... It recieves about 5 packets each second if you are idle, henc...

Deciphering Encoding: Packet Analyzation Tools

I am looking for better tools than wireshark for this. The problem with wireshark is that it does not format the data layer (which is the only part I am looking at) cleanly for me to compare the different packets and attempt to understand the third party encoding (which is closed source). Specifically, what are some good tools for viewi...

C# convert string into its byte[] equivalent

Hello all, At this point most people will be thinking "Ah ill post this..:" byte[] dataB= System.Text.Encoding.ASCII.GetBytes(data); However.. the problem I have is i need the exact value of the bytes with no encoding just the pure value for each byte. For example if the value of the string is (0xFF32) i want it to convert it too {25...

Problem With Regular Expression to Remove HTML Tags

In my Ruby app, I've used the following method and regular expression to remove all HTML tags from a string: str.gsub(/<\/?[^>]*>/,"") This regular expression did just about all I was expecting it to, except it caused all quotation marks to be transformed into &#8220; and all single quotes to be changed to &#8221; . What's the obviou...

HttpUtility.HtmlEncode doesn't encode everything

I am interacting with a web server using a desktop client program in C# and .Net 3.5. I am using Fiddler to see what traffic the web browser sends, and emulate that. Sadly this server is old, and is a bit confused about the notions of charsets and utf-8. Mostly it uses Latin-1. When I enter data into the Web browser containing "special"...

Change the characters in mysql with Convert failing - Still getting Não

Hey! I am populating this mysql table with data from a php (via post and using filter_input). The database is utf8 but when I have a user that inputs words with ^,',',~ like Não I get this -> Não What do I have to do to make it show the correct values. Or should I try to make some correction when I retrieve the data?? UPDATE: I hav...

phusion passenger charset

Hi All, I just installed Apache 2, Phusion Passenger and Rails 2.2.2 on Centos 5.2 64 bit server. My mysql database is latin1, and my setup works on php server, and my rails setup is also working besides character encoding with the data from database. I have set meta http-equiv="Content-Type" content="text/html;charset=iso8859-1" (omi...

Passing Hebrew encoded text by AJAX (windows 1255)

When making an AJAX call from the client, the server responds with Hebrew text. The PHP page that returns the result is in Windows-1255. For some reason, the result encoding is not Windows-1255, and all I see is gibberish instead of Hebrew. The result purposely contains HTML tags. I've tried urlencoding, base64 encoding, nothing works...