encoding

Have MTOM and Text message encoding in the same service

I have a WCF service, which expose multiple operation contracts. One contract is to upload a large file. So I want to use MTOM message encoding for that method and text encoding for other methods? How do I create a single service and use text and MTOM message encoding? ...

How do I display a Registered Trademark symbol (®) using VB.NET?

I have taken over support of an application at the company I work for. All of a sudden, the customer wants to be able to enter a registered trademark in a name field. The symbol, using ALT+0174, is being saved correctly, but the app is not encoding it properly. Essentially this is what I'm doing: Private Sub btnSave_Click(ByVal s...

Encoding problem with ASIHttpRequest

Hi, I have an encoding problem with ASIHttpRequest. When I get an URL, the data is returned perfectly except for a little encoding problem. This is my code: - (void)fetchGamesForCategory { NSString *url_string = [[NSString alloc] initWithFormat:url_match, theCategory._id]; NSURL *url = [NSURL URLWithString:url_string]; A...

Prevent & from showing up html

hey, On my html document for some reason instead of printing what it's suppose to be, it's just displaying & encoding is utf-8 any ideas? Thanks ...

Encoding in Ruby 1.8.7 or 1.9.2

I have been trying to use the gem 'character-encodings' which doesn't build in 1.9.2 however it does in 1.8.7 but even when I require 'encoding/character/utf-8' I still cant do the simplest of encoding. require 'encoding/character/utf-8' str = u"hëllö" str.length #=> 5 str.reverse.length #=> 5 str[/ël/] #=> "ël" I get ruby-1....

Encoding of URL paramaters

I got a page that is a callback page, when the user gets redirected to my page I hash the parameters and check if it is valid. My problem is when myParameter contains characters like å, ä and ö. If I change myParameter to "same value with åäö" in the controller, then it works. I believe it has something to do with encodings, and I have ...

How do I validate that an NSData is a PDF?

In working on a feed-reading iPhone app which displays nsdata's (html and pdf) in a UIWebView. I am hitting a snag in some PDF validation logic. I have an NSData object which I know contains a file with .pdf extension. I would like to restrict invalid PDFs from getting any further. Here's my first attempt at validation code, which see...

C# Effective way to find any file's Encoding

Hello. Yes is a most frequent question, and this matter is vague for me and since i don't now much about it. But i would like a very precise way to find a files Encoding. So precise as Notepad++ is. Thanks. ...

Losing language character with nusoap

Hi, I cant successfuly save data received with nusoap server with right coding. Language characters (Czech) are always replaced with question mark. Iam using PHP 5.3 and nusoap 0.9.5. I tried replacing every ISO-8859-1 with UTF-8 in nusoap source code but I cant make this work. Any advices would be much aprriciated. ...

why we need sys.setdefaultencoding("utf-8") in py scipt

I have seem a few script use this at top of py script,i curised when i need use it ? import sys reload(sys) sys.setdefaultencoding("utf-8") ...

File name charset problem in java

Trying to open a file it states it cannot be found, due to a charset mismatch, when file names have accents. I work using UTF-8 on a linux system (/etc/locales sets UTF-8 as well). Running jboss with -Dfile.encoding=UTF-8 and environment variable JBOSS_ENCODING="UTF-8" With a JSP I am getting the name of the file : String fileName =...

Passing fullstops (periods) and forward slashes in a GET request?

I have built a form that submits values to Wufoo as a GET request in the URL. I cannot get it to work if any of the values (in a textarea) contain a line-break or a forward slash. Is there a way to encode these in a URL?? This is being done in Rails. Many thanks in advance, Galen ...

Unicode value \uXXXX to Character in Javascript

I've never done this before and am not sure why it's outputting the infamous � encoding character. Any ideas on how to output characters as they should (ASCII+Unicode)? I think \u0041-\u005A should print A-Z in UTF-8, which Firefox is reporting is the page encoding. var c = new Array("F","E","D","C","B","A",9,8,7,6,5,4,3,2,1,0); ...

How do I perform an encoding-independent string-comparison in Java?

I'm having a strange problem comparing strings. I send a string to my server (as bytes using getBytes()) from the client. I've ensured that encoding is the same on the client and server by starting both of them with -Dfile.encoding=UTF-8. I noticed the problem when I was trying to perform a valueOf on the string I receive from the clien...

fckeditor characters encoding issue

am using fckeditor inside codeigniter framework when i retrive data from data base it show an unreconized characters instead of special characters (french charachters like é è ç ..) ? in data base data is converted to html entities, and i can show it without problem on the front pages, but in the backend i have a probleme with the editor...

Can't seem to generate hex-encoded string from SHA256 digest in Java

Can't seem to figure out where Im going wrong here: private static String generateHashFromFile(String filePath) { try { final int BUFSZ = 32768; MessageDigest sha = MessageDigest.getInstance("SHA-256"); FileInputStream in = new FileInputStream(filePath); BufferedInputStream is = new BufferedInputStream(in, BUFSZ); byte...

How to convert these kind of characters to their corresponding unicode characters in Ruby?

I want to know how to convert these kind of characters to their unicode form, such as the following one: Delphi_7.0%E6%95%B0%E6%8D%AE%E5%BA%93%E5%BC%80%E5%8F%91%E5%85%A5%E9%97%A8%E4%B8%8E%E8%8C%83%E4%BE%8B%E8%A7%A3%E6%9E%90 The unicode characters of the upper string is: Delphi_7.0数据库开发入门与范例解析 Anybody knows how to do the conversion ...

Encoding problems with dBase III .dbf files on different machines

Hello. I'm using C# and .NET 3.5, trying to import some data from old dbf files using ODBC with Microsoft dBase Driver. The dbf's are in dBase III format and using ibm850 encoding for strings. Now, when I run my program on my machine, all string data read from OdbcDataReader comes out converted to UTF-16 or UTF-8 or something, idk a...

How to encode only 2 chars in path?

I have a $delete path and a $user_id each include '#' and '@' respectively within the string. How can I replace each with the encoded value %23 and $40. I tired using str_replace but did not have any luck: str_replace($string, array('@', '#'), array('%40', '%23')); My full Delete path looks like this: $delete = "http://admin:12345@19...

sprintf warning - encoding issue

I'm using the following code to find all properties for a user and in turn delete them. My problem is that I'm getting a warning: Warning: sprintf(): Too few arguments for each of the properties. However, when I manually enter the $user_id for the delete string as first_last%%40ourwiki.com it works! Seems like sprintf requires double ...