Do you know how to use iconv.dll?

Post Reply
kkwan
Posts: 10
Joined: Tue Apr 17, 2018 11:39 am

Do you know how to use iconv.dll?

Post by kkwan »

I have a question.

convert from ansi characters to UTF8
Converting from UTF8 to ANSI characters
Occasionally, unwanted broken characters stick behind.

example)
ansi-> utf8

   cStr: = AnsiToWide (cStr)
   cStr: = HB_TRANSLATE (cStr, "UTF16LE", "UTF8")

utf8-> ansi
   cStr: = HB_TRANSLATE (cStr, "UTF8", "UTF16LE")
   cStr: = WideToAnsi (cStr)
  
// ----------------------------------------------


So we are using iconv.exe for Windows.
This is cumbersome to open cmd.
Of course, it is automated as a .bat file.

I want to know if iconv.dll is available.
I'd appreciate it if you could tell me how to use it.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Do you know how to use iconv.dll?

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
kkwan
Posts: 10
Joined: Tue Apr 17, 2018 11:39 am

Re: Do you know how to use iconv.dll?

Post by kkwan »

Thank you for your quick reply.
View sample and make it available in FWH
I tried coding but it was not what I wanted.
I'm sorry, but if you can support it right away in FWH
Thank you.
If not, I'll just give up.
I think it is not so important.
There are many ways to do this.
kkwan
Posts: 10
Joined: Tue Apr 17, 2018 11:39 am

Re: Do you know how to use iconv.dll?

Post by kkwan »

ANSI-> UTF8
UTF8-> ANSI

If you convert, you may notice that the undesired
We have resolved the following.
Thank you.

However, I would appreciate it if you support it in iconv.dll FWH.

cStr: = cStr + "#"
CSTR = AnsiToWide (CSTR)
CSTR = HB_TRANSLATE (CSTR "UTF16LE", "UTF8")
nPos: = at ("#", cStr)
Return SubStr (cStr, 1, nPos-1)
Post Reply