encoding

UriBuilder incorrectly encoding Query Parameters value ?

Lets consider the following code sample where a path and single parameter are encoded... Parameter name: "param" Parameter value: "foo/bar?aaa=bbb&ccc=ddd" (happens to be a url with query parameters) String test = UriBuilder.fromPath("https://dummy.com"). queryParam("param", "foo/bar?aaa=bbb&ccc=ddd"). ...

How is a relative JMP (x86) implemented in an Assembler?

While building my assembler for the x86 platform I encountered some problems with encoding the JMP instruction: OPCODE INSTRUCTION SIZE EB cb JMP rel8 2 E9 cw JMP rel16 4 (because of 0x66 16-bit prefix) E9 cd JMP rel32 5 ... (from my favourite x86 instruction website, http://siyobik.info/index.php?module=...

How can I extract similarities/patterns from a collection of binary strings?

I have a collection of binary strings of given size encoding effective solutions to a given problem. By looking at them, I can spot obvious similarities and intuitively see patterns of symmetry and periodicity. Are there mathematical/algorithmic tools I can "feed" this set of strings to and get results that might give me an idea of wh...

Encoding problem (Hebrew UTF8) in WordPress

Hi all, I have a blog (of a friend) I am failing to fix: http://www.nivcalderon.com/ The language of the website is Hebrew, but the encoding scrambles the output, and I can't find how to fix it. I tried changing the DB colliation to be utf8_general_ci. I added this: define('DB_COLLATE', 'utf8_general_ci'); To the wp-config (and ...

Why might my PHP log file not entirely be text?

I'm trying to debug a plugin-bloated Wordpress installation; so I've added a very simple homebrew logger that records all the callbacks, which are basically listed in a single, ultimately 250+ row multidimensional array in Wordpress (I can't use print_r() because I need to catch them right before they are called). My logger line is $log...

[php] mysql and encoding

I moved my php application to the new server. i use mysql5 db. When i'm Updating or Inserting something to db, every " and - sign changed to ?. I use SET NAMES UTF8 and SET CHARACTER SET but it don't work. Any ideas? ...

need to display proper JP char in the output

Hello All, I am appending some string using stringbuilder. string contains some html tags and JP characters and finally saving o/p as HTML. JP output is not coming as expected ? Issue: I need to display proper JP char in the output, as of now thay are not appearing as expected..any suggestion ? Thanks in advance... Not sure but coul...

File Encoding handling in Eclipse 3.5

Hi, I use Eclipse 3.5 on Windows, with PDT and Subclipse plugins, with both legacy projects using ISO-8859-1 encoding (latin-1), and newers ones wich use UTF-8. I configured my workspace to use UTF-8, and I configured old projects to use latin-1. But every time I open an old project, it use UTF-8. With a workspace using latin-1 by defa...

Change default encoding for RubyMine?

Is it possible to change the default encoding for RubyMine to be UTF-8 instead of MacRoman or ASCII? ...

Python and hebrew encoding/decoding error

Hey, I have sqlite database which I would like to insert values in Hebrew to I am keep getting the following error : UnicodeDecodeError: 'ascii' codec can't decode byte 0xd7 in position 0: ordinal not in range(128) my code is as following : runsql(u'INSERT into personal values(%(ID)d,%(name)s)' % {'ID':1,'name':fabricate_heb...

Django Encoding Issues with MySQL

Okay, so I have a MySQL database set up. Most of the tables are latin1 and Django handles them fine. But, some of them are UTF-8 and Django does not handle them. Here's a sample table (these tables are all from django-geonames): DROP TABLE IF EXISTS `geoname`; SET @saved_cs_client = @@character_set_client; SET character_set_client ...

Encoding problem wirh JDBC and MySQL

I'm grabbing data from RSS-channels, sanitize it and save in the database. I use java, tidy, MySQL and JDBC. Steps: I grab RSS-records. It's OK. I sanitize html with tidy. Here is one transformation. Tidy automatically converts strings like "So it’s unlikely" to "So it’s unlikely". I save this string to the table MySQL scheme ...

How do I raw URL encode/decode in JavaScript and Ruby to get the same values in both?

I am working on a web application where I have to encode and decode a string at the JavaScript side and Ruby backend of the code. the only problem is that the escape methods for JavaScript and Ruby have a small difference. in JavaScript the " " is treated as "%20" but in ruby the " " is encoded to "+". Any way to solve this? Another Rub...

Trouble with encoding and urllib

Hello, I'm loading web-page using urllib. Ther eis russian symbols, but page encoding is 'utf-8' 1 pageData = unicode(requestHandler.read()).decode('utf-8') UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 262: ordinal not in range(128) 2 pageData = requestHandler.read() soupHandler = BeautifulSoup(pageData) pri...

case insenstive string replace that correctly works with ligatures like "ß" <=> "ss"

I have build a litte asp.net form that searches for something and displays the results. I want to highlight the search string within the search results. Example: Query: "p" Results: a<b>p</b>ple, banana, <b>p</b>lum The code that I have goes like this: public static string HighlightSubstring(string text, string substring) { var inde...

VS2008 asp.net spits out gibberish, possibly wrong encoding issue.

Hello, I have inherited a project, it was originally written in VS2005. I have made a few changes, but all are design. Now when I run the project using the visual studio's web server, in IE8, the page shows up just fine, however in FireFox 3.6.3, I get gibberish (a full page of this): �I�%&/m�{J�J��t��$ؐ@�����iG#)�*��eVe]f@�흼 ��{��...

How is this website fixing the encoding ??

Hi all, I am trying to turn this text: ×וויר. העתיד של רשתות חברתיות והתקשורת ×©×œ× ×• Into this text: אוויר. העתיד של רשתות חברתיות והתקשורת שלנו Somehow, this website: http://www.pixiesoft.com/flip/ Can do it, and I would like to know how I might be able to do it myself (with whatever programming...

UTF-8 xml file shows Gibberish

I have a UTF-8 encoded xml file, which was exported from a Wordpress MySQL database. While the file is saved as UTF-8, and the encoding is UTF-8, I get gibberish instead of the Hebrew text that is supposed to be in there, which looks like this: ™×•×˜×•×ª How can I find the original encoding or charset and convert the text into pro...

Read a file with a specific encoding in C?

Hi, I've a file that was written on windows with encoding WINDOWS-1256, and I need to write a C program that reads bytes from this file and write them back to a new file with UTF-8 encoding. How to read a file with a specific encoding in C ?? ...

Ruby encoding problem

I'm just starting to learn Ruby and have a problem with encoding; require 'rubygems' require 'mechanize' agent = Mechanize.new agent.get('myurl.....') agent.page.search('#reciperesult a').each do |item| c = Mechanize.new c.get(item.attributes['href']) puts c.page.search('#ingredients li').text end The output text are shown li...