Hi, Is there any ASP script that can convert the charset of a string from UTF-8 in WINDOWS-1253? I have found a script in PHP only but my pages are in ASP. this is the PHP script $string = mb_convert_encoding($string, "utf8", "greek") PHP: is there any equivalent script in ASP? Thanks in advance.
Why are you trying to make the conversion... is it for input into a database? I did find this if it's any help: http://stackoverflow.com/questions/916118/classic-asp-how-to-convert-string-to-utf8-to-usc2
You can look at the likes of http://www.moretechtips.net/2008/10/convert-string-to-bytes-and-vice-versa.html
Not really, but you are talking about something that came about in the mid 90s which is more or less the dawn of the internet as anything more than just for geeks. Its much a question of why the hell your doing a site in such an old technology as .Net is much more straight forward, logical and obviously massively better than both classic ASP and PHP
I have found the website of my company allready builded in ASP and i can't change it in asp.net just like that. Also i don't know ASP.NET at all. I use PHP outside my work because is the most popular scripting language and i can find plenty of PHP tools and scripts over the web. Neither ASP and ASP.NET have so many free scripts and tools. Also PHP is open source and i don't have to pay for windows, SQL server etc.
You dont have to pay for SQL server with .Net either as SQL Express can run databases up to 2 gig or you can still use MySQL with .Net too. Whilst it isnt good practice, most VBScript will run in a VB.Net environment it is just inefficient (as non-compiled scripting languages are in comparison). Have known more than one person to simply make all their Classic ASP into ASP.Net without changing any of the actual coding and then over time replace the VBScript with .Net You only need 1 tool with .Net and that is Visual Studio or the free ASP.Net version of it.
Try something like this Dim theString As String = "Hello, World!" Dim utf8 As Encoding = Encoding.UTF8 Dim greek As Encoding = Encoding.GetEncoding("windows-1253") Dim unicodeBytes As Byte() = greek.GetBytes(theString) Dim asciiBytes As Byte() = Encoding.Convert(greek, utf8, unicodeBytes) Dim asciiChars(utf8.GetCharCount(asciiBytes, 0, asciiBytes.Length)) As Char utf8.GetChars(asciiBytes, 0, asciiBytes.Length, asciiChars, 0) Dim asciiString As New String(asciiChars) http:// msdn. microsoft. com/en-us/library/system.text.encoding.convert(v=vs.71). aspx