NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: kevin plummer on May 25, 2016, 08:33:04 PM

Title: OT String Theory and UTF8
Post by: kevin plummer on May 25, 2016, 08:33:04 PM
Hi All,

I'm trying to convert some data to make the below US ASCII compatible using string theory but the following does not work. Anyone know what I'm doing wrong?


Field" = 'MIDÁSZ PROPERTY MANAGEMENT KFT ARANY JÁNOS UTCA 15'

        st.SetValue(Field")
        If st.ToUnicode(st:EncodeUtf8) = 0
            Message('error convertring to UTF8. Field=' & Field")
        END
        st.RemoveChars('<13,10><13><10>')
        Field" = st.GetValue()
Title: Re: OT String Theory and UTF8
Post by: kevin plummer on May 26, 2016, 04:32:38 AM
for anyone interested Bruce replied to my email and I was missing the 2nd parameter as shown below.

st.ToUnicode(st:EncodeUtf8,st:CP_WINDOWS_1250)
Title: Re: OT String Theory and UTF8
Post by: kevin plummer on May 26, 2016, 04:36:33 PM
Update:

st.ToUnicode(st:EncodeUtf8,st:CP_WINDOWS_1250)

didn't actually work but the following does:

st.encoding = st:EncodeAnsi
st.ToUnicode()     

Thanks Kevin Benson for the above!
Title: Re: OT String Theory and UTF8
Post by: Aje.elias on May 27, 2016, 05:47:30 AM
Thanks!!
This helped me!!

Alejandro