![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | vbscript language conversions hi, I have a webpage that accepts posts in another language, when i insert this post into my sql server database it automatically converts it to the form ฒൈ etc... This is fine as the browser then converts it back into the language. My problem is i am now importing text in that language straight into the database from an excell file. so i now i need to convert the language to the same format using vb. I have tried acsii and unicode but cant seem to get it in the same format of ฒ where it can be read by the browser. sorry if this doesnt quite fit the vbcript category i wasnt sure where i should post it. I'm getting desperate any help on this would be great. Regards, Dean *** Sent via Developersdex http://www.developersdex.com *** |
My System Specs![]() |
| | #2 (permalink) |
| | Re: vbscript language conversions "Dean g" <big_deanus@xxxxxx> wrote in message news:edXQ9RE$IHA.1224@xxxxxx Quote: > hi, > I have a webpage that accepts posts in another language, when i insert > this post into my sql server database it automatically converts it to > the form ฒൈ etc... > > This is fine as the browser then converts it back into the language. My > problem is i am now importing text in that language straight into the > database from an excell file. so i now i need to convert the language to > the same format using vb. I have tried acsii and unicode but cant seem > to get it in the same format of ฒ where it can be read by the > browser. > > sorry if this doesnt quite fit the vbcript category i wasnt sure where i > should post it. > Bad air code follows but is the general principle needed:- output = "" For i = 1 to Len(s) charCode = AscW(Mid(s, i, 1)) If charCode > 127 Then output = output & "&#" & charcode & ";" else output = Mid(s, i, 1) End If Next Is there any way you stop storing the data like this, its not a good design choice to pollute persisted data with encodings for specific transport or presentation technologies. What if you wanted at some point to use a server side report generation tool that creates a PDF for example? -- Anthony Jones - MVP ASP/ASP.NET |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| How to do No hang up VBScript (nohup for VBScript) | VB Script | |||
| Powershell Wrapper Script Problems - Trying to Call PowershellExchange 2007 Commands from Secondary Language (Like VBScript) | PowerShell | |||
| <SCRIPT LANGUAGE="VBScript"> and <%%> | VB Script | |||
| i don't have my language on installed input language | Vista General | |||
| SID Conversions for elevated Restricted Users | Vista security | |||