472,372 Members | 1,419 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,372 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 6470

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 ?
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

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.