How to handle German Umraut?

Post Reply
User avatar
kim yong woo
Posts: 57
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 | Expand


  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: 806
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 | Expand


  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
kim yong woo
Posts: 57
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