Windows Vista Forums

vbscript language conversions

  1. #1


    Dean g Guest

    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 SpecsSystem Spec

  2. #2


    Anthony Jones Guest

    Re: vbscript language conversions


    "Dean g" <big_deanus@xxxxxx> wrote in message
    news:edXQ9RE$IHA.1224@xxxxxx

    > 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.
    >
    Show us some code you have tried? How close have you got.

    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 SpecsSystem Spec

vbscript language conversions

Similar Threads
Thread Forum
VbScript and Windows 7 x64 - in IEx64 vbscript works, but not in I
We have a windows 7 x64 machine - a fresh install. We created a <script language="vbscript"> tag inside a web page, with a simple window.alert...
VB Script
are VBscript on Windows server 2003 and VBscript on WS2008 compatible?
Hi everybody, Sorry if my question has already been asked, but I haven't found anything which is clear for me on this point. I spent a lot of...
VB Script
Can a vbscript identify the program/process that called a vbscript
I would like to code a vbscript ("ActionScript.vbs") in such a way that it would do X, if ActionScript.vbs were called by "TriggerScriptA.vbs", but...
VB Script
How to do No hang up VBScript (nohup for VBScript)
I'm running XP SP-2. How can I execute a VBScript so that when I log out the script continues to execute. More specifically... I'd like to...
VB Script
Powershell Wrapper Script Problems - Trying to Call PowershellExchange 2007 Commands from Secondary Language (Like VBScript)
I'm trying to create a wrapper script in powershell that will execute any commands I pass to it as arguments after loading all of the appropriate...
PowerShell
<SCRIPT LANGUAGE="VBScript"> and <%%>
Which are the differences between "<SCRIPT LANGUAGE='VBScript'>" and "< %%>"?? thanks! :)
VB Script
SID Conversions for elevated Restricted Users
I'm developing a program that needs Administrative privileges, so I have added the "Vista manifest" to get UAC to prompt for a password. So far, so...
Vista security