Do you know how to use iconv.dll?

Do you know how to use iconv.dll?

Postby kkwan » Mon May 07, 2018 8:33 am

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.
kkwan
 
Posts: 10
Joined: Tue Apr 17, 2018 11:39 am

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

Postby Antonio Linares » Mon May 07, 2018 9:45 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42127
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

Postby kkwan » Tue May 08, 2018 5:54 am

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?

Postby kkwan » Tue May 08, 2018 8:34 am

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)
kkwan
 
Posts: 10
Joined: Tue Apr 17, 2018 11:39 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 58 guests