2
голосов
3ответов
2953 просмотров

php's $_SERVER['REQUEST_URI '] encoding problem?

When I output $_SERVER['REQUEST_URI']; on: http://localhost/tools/?tool=cs&sub=1 I get: /tools/?tool=cs⊂=1 Is there other solution to get /tools/?tool=cs&sub=1 besides using & instead of & ?

18
голосов
9ответов
22734 просмотров

How do I encode a file name for download?

When the file name is "Algunas MARCAS que nos acompañan" ASP.NET MVC raise an System.FormatException when I try to download that file. But if the file name is "Asistente de Gerencia Comercial" it doesn't. I guess this is because something related to UTF-8 encoding, but I don't know how to encod...

6
голосов
2ответов
5000 просмотров

Change Website Character encoding from iso-8859-1 to UTF-8

About 2 years ago I made the mistake of starting a large website using iso-8859-1. I now am having issues with some characters, especially when sending data to the server using ajax. Because of this, I would like to switch to using UTF-8. What issues do you see coming from this? I know I wo...

2
голосов
6ответов
1459 просмотров

converting from base 10 to base 31 (working only with select characters)

I'd like to convert base 10 numbers to base 31 I would like to use only these characters: 23456789abcdefghjkmnpqrstuvwxyz As you can see, 5 characters are excluded (i don't need these): 1 0 o l i The function I have now is below but of course it doesn't work. When 2 is input it outputs 4. The ...

0
голосов
2ответов
609 просмотров

Transforming XML in ISO-8859-1 to HTML

I have an XML document that I'm transforming using XSL and then spitting out directly into an HTML document (all server side). Everything works OK functionally but special characters (specifically the © symbol -- these are ads and many have © symbols) don't show up right (IE shows ? and FF shows...

3
голосов
4ответов
5614 просмотров

ASP.NET Filename encoding while sending file

I am sending a file from ASP.NET Page to the browser. To properly send a filename I am adding a header: Response.ContentType = "application/octet-stream"; Response.AddHeader("Content-Disposition", "attachment; filename=" + filename); The problem is that when file contains white spaces (e.g. "a...

55
голосов
2ответов
72442 просмотров

Base64 encoded string to file

I have a base64 encoded string. How can I write this base64 encoded string to a file?

0
голосов
3ответов
993 просмотров

problems with encoding (php)

My site have a utf-8 encoding (Drupal). I use include function to integrate my page with 3rd party service. But this gives a bad result - bad encoding for include part of page. i try this, but this don't give any result: iconv("ASCII","utf-8",include("http://new.velo-travel.ru/themes/themex/sp...

10
голосов
1ответов
4648 просмотров

Add windows encoding to Eclipse on linux

I have a legacy project which has all the source files, templates, properties written in cp1250 encoding. (Windows 1250 - central european). Recently I switched from Windows to Ubuntu and found out, that fresh installation of Eclipse 3.5 doesn't have cp1250 in neither project properties nor works...

2
голосов
2ответов
179 просмотров

What encoding is this... and how do you escape it in php?

Im working on an imdb data scraper for a site, and I they seem to encode everything in a weird encoding I never saw before. <a href="/keyword/exploding-ship/">Exploding Ship</a> A Bug's Life Is there a php function that will convert these to regular characters?

0
голосов
2ответов
187 просмотров

properly endcoding & for twitter post

My automated call to the Twitter API causes problems when my update string has a & in it. How do I properly encode my update string $update that contains a & before I use CURL to call the Twitter API? // Set username and password for twitter API $username = '***'; $passw...

0
голосов
2ответов
324 просмотров

Post form data and sending it using mail - php

I have some troubles with encoding and mailing. I send post-request to php-script, when I do print_r( $_POST ); I could see my text normally, but when I'm trying to send it into email, using code: $text = ...; // Includeing data from $_POST; $headers = "From: test\r\n"; $headers .= "...

1
голосов
4ответов
15322 просмотров

utf-8 to iso-8859-1 encoding problem

I'm trying preview the latest post from an rss feed on another website. The feed is UTF-8 encoded, whilst the website is ISO-8859-1 encoded. When displaying the title, I'm using; $post_title = 'Blogging – does it pay the bills?'; echo mb_convert_encoding($post_title, 'iso-8859-1','utf-8'); ...

4
голосов
1ответов
372 просмотров

How to convert the encoding of an string to UTF-8 without know the original encoding in C#?

I'm reading a CSV file with Fast CSV Reader (on codeproject). When I print the content of the fields, the console show the character '?' in some words. How can fix it?

33
голосов
10ответов
72668 просмотров

Character with encoding UTF8 has no equivalent in WIN1252

I am getting the following exception: Caused by: org.postgresql.util.PSQLException: ERROR: character 0xefbfbd of encoding "UTF8" has no equivalent in "WIN1252" Is there a way to eradicate such characters, either via SQL or programmatically? (SQL solution should be preferred). I was thinking ...

3
голосов
3ответов
4113 просмотров

How to a recover a text from a wrong encoding?

I have got some files created from some asian OS (chinese and japanese XPs) the file name is garbled, for example: иè+¾«Ñ¡Õä²ØºÏ¼­ how i can recover the original text? I tried with this in c# Encoding unicode = Encoding.Unicode; Encoding cinese = Encoding.GetEncoding(936); byte[] chinese...

1
голосов
3ответов
6316 просмотров

Converting data from nvarchar to varchar in C#

As part of an integration task I am doing, I have a column in my database that has the type nvarchar(30) and I need call a WCF service and pass through the values in this column (among others) that will then be stored in a column that has the type varchar(30) in the other database. What should I...

3
голосов
3ответов
8755 просмотров

Howto use maven in a heterogenous environment with different encodings?

I've created a svn repositoy on a linux server (Debian) and used a client on a windows machine to check my java sources in. Now I've set up a Hudson server on a different linux server (Ubuntu) to periodically run tests on my code. But the tests fail with a compiler error: Error: unmappable cha...

15
голосов
5ответов
17179 просмотров

Why does HttpUtility.UrlEncode(HttpUtility.UrlDecode("%20")) return + instead of %20?

I'm having a problem with a file download where the download is replacing all the spaces with underscores. Basically I'm getting a problem here: Response.AddHeader("Content-Disposition", "attachment; filename=" + someFileName); The problem is that if someFileName had a space in it such a...

0
голосов
2ответов
211 просмотров

PHP upgrade problem - Is this an encoding error?

I upgraded php-common and php-devel packages on CentOS 5.3 system. Now, when I try to access any PHP script in a browser I get garbage like this: alt text http://javierdesign.com/error.jpg If I try to CURL GET the page, or try plain HTML, CSS or JS in the browser everything looks OK. Encoding ...

1
голосов
2ответов
316 просмотров

Encoding amount in paypal payment

I'm having trouble figuring out how to prevent people from editing the amount in my shopping cart with tools such as firebug. How do I make sure users can't edit the hidden field? Can I encode the amount before sending it to paypal? Thanks! Francois

0
голосов
2ответов
4039 просмотров

iText encoding problem

I have encoding problem with iText (http://www.lowagie.com/iText/). I load data from database and insert it as html to pdf with iText, for some reason my non-english (Finnish ä,ö etc) characters don't show up correctly. Following example shows how insert text to html: text = "<p>" + da...

4
голосов
1ответов
1096 просмотров

What's the deal with dontEscape support in Uri? .NET 3.5

Documentation state that dontEscape is deprecated and always false. However it actually works. Is it a good idea to use it anyway, or is there any other alternative to send non RFC compliant Http requests? Sample Code: Dim U As New Uri("http://www.google.com/>", True) Dim W As New Net.WebC...

20
голосов
3ответов
29954 просмотров

What's the correct encoding of HTTP get request strings?

Does the HTTP standard or something define which encoding should be used on special characters before they are encoded in url with %XXs? If it doesn't define is there a way define which encoding is used? It seems that most browsers send the data in utf-8.

1
голосов
3ответов
8487 просмотров

Silverlight Video Player that plays .MP4 & .FLV

I am currently using the Silverlight 2 Video Player to stream videos. I have been very pleased with it but it only seems to stream .WMV files. Does anyone know if there is a good Silverlight video player that will stream other types of video files, especially .MP4 & .FLV? I would be happy ...

2
голосов
1ответов
1788 просмотров

Unicode in NetBeans 6.7.1

When I type any text on Georgian language. NetBeans shows it like question marks. I'm using Windows7(georgian keyboard). I've also tried in Eclipse, but there is no such problem (everything works fine). Then I've tried to open my Eclipse project folder in NetBeans with some html files and the q...

7
голосов
3ответов
8192 просмотров

Why can't I set the XDocument XDeclaration encoding type to iso-8859-1?

Why doesn't the following code set the XML declaration encoding type? It always sets the encoding to utf-16 instead. Am I missing something very obvious? var xdoc = new XDocument( new XDeclaration("1.0", "iso-8859-1", null), new XElement("root", "") ); output: <?xml version="1.0" enc...

0
голосов
6ответов
5514 просмотров

File is not saved in UTF-8 encoding even when I set encoding to UTF-8

When I check my file with Notepad++ it's in ANSI encoding. What I am doing wrong here? OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(file), "UTF8"); try { out.write(text); out.flush(); } finally { out.c...

8
голосов
5ответов
19435 просмотров

Encoding java Cookie value

How should you encode the actual value for a Java Cookie object? I cannot pass characters like '=' or any character outside US-ASCII. /Br joynes

1
голосов
6ответов
527 просмотров

Encoding patterns in a 2D space (matrix)

I have a 2D MxN grid (or matrix). The cells in the matrix may hold an integer. A cell with a non-zero integer is said to be populated. The set of populated cells in the matrix is known as a "configuration". I want to come up with an encoding or hashing algorithm that wil allow me to uniquely ide...