How to handle German Umraut?

Post Reply
User avatar
kim yong woo
Posts: 55
Joined: Sun Apr 12, 2009 10:51 am
Location: Seoul, Korea
Contact:

How to handle German Umraut?

Post by kim yong woo »

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

  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
richard-service
Posts: 583
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Contact:

Re: How to handle German Umraut?

Post by richard-service »

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

  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
Regards,

Richard

Harbour 3.2.0dev (r1904111533)/xHarbour 1.2.3 Intl. (SimpLex) (Build 20180818) => Borland C++ v7.4
xHarbour 0.99.71 (SimpLex) => Borland C++ v5.5
MySQL v5.7 /ADS v12
Harbour 3.2.0dev (r1603181642) => Borland C++ v7.4 64bit
User avatar
kim yong woo
Posts: 55
Joined: Sun Apr 12, 2009 10:51 am
Location: Seoul, Korea
Contact:

Re: How to handle German Umraut?

Post by kim yong woo »

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.
Post Reply