473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ASP: Convert UTF-8 to windows-1251 charset

Platform: IIS6, windows 2000 Server, ASP + VBSCRIPT
I have an ASP application that posts FORM via XMLHttprequest (javascript) so that all data is posted in UTF-8.
So I have an ASP that get data in UTF-8 charset and I should convert it into WINDOWS-1251 charset to send data to DB via ADO.
I tried to use Chilcat Charset ActiveX module, but it didnt work for me because I need to convert from UTF-8 to win1251 into variable, not using Response.BinaryWrite method.

for ex
StreetName = Request.QueryString("StreetName") ' UTF-8 -> StreetName=%D0%9C%D0%BE%D1%81%D0%BA

Then I pass this variable further into StoredProc Call:
set cmdSP = Server.CreateObject("ADODB.Command")
cmdSP.CommandText = "billing.adm.ajx_StreetNames"
cmdSP.CommandType = adCmdStoredProc
cmdSP.ActiveConnection = DBconn
Set param = cmdSP.CreateParameter("@StreetName", adVarchar, adParamInput, 254, StreetName )
cmdSP.Parameters.append param

Does anybody have or knows a module that can do simple conversion from UTF-8 to win1251 charset? Something like iconv module in PHP.
May 10 '07 #1
0 6601

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Oliver Kurz | last post by:
Hello, could someone tell me the best way to convert a string to utf, for example to utf-8? The problem: I have no controll about the source where the string comes from. It could have any...
2
by: Patrice | last post by:
Hi, I want to populate a multidimentional asp array from a database. Then convert this asp array to a javascript array as to make a slideshow with a description text and hyperlink. My problem is...
2
by: WEIWEIWEI | last post by:
Hi Al I'd like to encode a string submitted from a utf-8 form in a aspx page to big5 Any ideas on how to do that I try sth like public static string unicode_big5(string src) { Encoding big5...
4
by: Sharon | last post by:
Hi all. Url encoding a string on asp page and url decoding the string on aspx page, non English characters are lost. Encoding and decoding on the same page, asp or aspx, works fine. Any idea?...
8
by: davihigh | last post by:
My Friends: I am using std::ofstream (as well as ifstream), I hope that when i wrote in some std::string(...) with locale, ofstream can convert to UTF-8 encoding and save file to disk. So does...
3
by: GM | last post by:
Dear all, Could you all give me some guide on how to convert my big5 string to unicode using python? I already knew that I might use cjkcodecs or python 2.4 but I still don't have idea on what...
3
by: Jared Wiltshire | last post by:
I'm trying to convert a wstring (actually a BSTR) to UTF-8. This is what I've currently got: size_t arraySize; setlocale(LC_CTYPE,"C-UTF-8"); arraySize = wcstombs(NULL, wstr, 0); char...
5
by: k.vanderstarren | last post by:
Hi All, I'm trying to convert some ASP.NET code that I found at http://weblogs.asp.net/dannychen/archive/2005/12/02/432190.aspx from VB to C#. I've managed to convert the portion that is in...
4
by: Christian Mairoll | last post by:
Hello, I'm maintaining a multi language website and have tried to convert it from ASP.NET 1.1 to 2.0 using Visual Studio 2005. When it had finished, I noticed, that it converted all my aspx...
1
by: =?Utf-8?B?c3NyOTI=?= | last post by:
Hi, I need to a function that performs the same task than mb_strlen (in php)? Any help ?
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.