FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to handle German Umraut?
Posts: 57
Joined: Sun Apr 12, 2009 10:51 AM
How to handle German Umraut?
Posted: Tue Jan 03, 2017 03:01 AM
Happy New year!

I happen to face German character "äöü" input.

Through web surfing, I found one advice recommending to use "encoding" as "UTF-8" with Notepad++.
So, tried to compile following sample prg. (There is Umraut "ü" in "für")

Code (fw): Select all Collapse
  Function Main()
  LOCAL cFile:="Verbrauchsmaterial für COAGUCHECK.pdf"
 
  hb_MemoWrit(cFile,"Test of Harbour")
  IF FILE(cFile)
      MsgInfo( cFile + " is there", Version() )
  ELSE
      MsgInfo( cFile + " is NOT there", Version() )
  ENDIF
Return Nil


But, when I did compile, "für" was broken as following picture.

http://pharmalink.kr/images/german.jpg

My final goal is to input "aä" as value in following command. (a+Umlaut ä )

::oAx:getElementById("LeftContent_ucSearch1_txtSearch"):= "aä"

Please guide how to handle this problem.
Thanks.
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: How to handle German Umraut?
Posted: Tue Jan 03, 2017 07:13 AM
kim yong woo wrote:Happy New year!

I happen to face German character "äöü" input.

Through web surfing, I found one advice recommending to use "encoding" as "UTF-8" with Notepad++.
So, tried to compile following sample prg. (There is Umraut "ü" in "für")

Code (fw): Select all Collapse
  Function Main()
  LOCAL cFile:="Verbrauchsmaterial für COAGUCHECK.pdf"
 
  hb_MemoWrit(cFile,"Test of Harbour")
  IF FILE(cFile)
      MsgInfo( cFile + " is there", Version() )
  ELSE
      MsgInfo( cFile + " is NOT there", Version() )
  ENDIF
Return Nil


But, when I did compile, "für" was broken as following picture.

http://pharmalink.kr/images/german.jpg

My final goal is to input "aä" as value in following command. (a+Umlaut ä )

::oAx:getElementById("LeftContent_ucSearch1_txtSearch"):= "aä"

Please guide how to handle this problem.
Thanks.


Try to save as UTF8 type PRG
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 57
Joined: Sun Apr 12, 2009 10:51 AM
Re: How to handle German Umraut?
Posted: Tue Jan 03, 2017 10:28 AM

Dear Mr. Richard,

I've saved as UTF8 type prg.
There was no difficulty in saving, and when I retrieve file, the Umraut was retrieved perfectly.

But, when compiled & executed, I can not see Umraut and broken characterw were shown as picture.

Continue the discussion