How to handle German Umraut?

How to handle German Umraut?

Postby kim yong woo » Tue Jan 03, 2017 3: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: Select all  Expand view

  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:document:getElementById("LeftContent_ucSearch1_txtSearch"):value:= "aä"

Please guide how to handle this problem.
Thanks.
User avatar
kim yong woo
 
Posts: 57
Joined: Sun Apr 12, 2009 10:51 am
Location: Seoul, Korea

Re: How to handle German Umraut?

Postby richard-service » Tue Jan 03, 2017 7: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: Select all  Expand view

  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:document:getElementById("LeftContent_ucSearch1_txtSearch"):value:= "aä"

Please guide how to handle this problem.
Thanks.


Try to save as UTF8 type PRG
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: How to handle German Umraut?

Postby kim yong woo » 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.
User avatar
kim yong woo
 
Posts: 57
Joined: Sun Apr 12, 2009 10:51 am
Location: Seoul, Korea


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 114 guests