Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Converting Unicode Hex String to Unicode Characters

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Converting Unicode Hex String to Unicode Characters
 Login/Join
 
Member
posted
Hi,

I had a need to convert Unicode Hex string to corresponding characters in a report. For example, the Unicode Hex string "738B 514B 52E4" will be converted to Chinese characters "王克勤".

I would be happy to hear any suggestions.

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8.2
Windows Server 2016
PDF, Excel
 
Posts: 11 | Registered: June 08, 2017Report This Post
Expert
posted Hide Post
Wow,

Where's the data coming from ?

I wonder if there is a utility that could be called from the command line.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
Hi,

The data comes from another web application which converts user input to hexadecimal string.

I'm also wondering if there is any existing WebFocus function for this conversion.

This message has been edited. Last edited by: yehf,


WebFOCUS 8.2
Windows Server 2016
PDF, Excel
 
Posts: 11 | Registered: June 08, 2017Report This Post
Expert
posted Hide Post
I don't like your chances for an out of the box solution.

But its worth searching the documentation for a function that could help.

If all else fails, contact Techsupport and ash them if one exists.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
Hi,

Can anyone tell me if I can use "Alpha variables in bytes - Unicode only" as the DBMS/Source data type in the master file for hexadecimal string?

If yes, what's the right data format? i.e, "738B 514B 52E4" or "\u738B\u514B\u52E4"?

In addition, I find that WebFocus provides a function called UFMT for the purpose of converting character strings to "hex" but I'm looking for opposite way of this data conversion.

This message has been edited. Last edited by: yehf,


WebFOCUS 8.2
Windows Server 2016
PDF, Excel
 
Posts: 11 | Registered: June 08, 2017Report This Post
Virtuoso
posted Hide Post
Pop those characters into flat file with the proper encoding (utf8 should be sufficient). Create a master file with a codepage of 65001. You should be able to query it at that point.

Here is the kicker: You will have to change the default encoding of your server to 65001 (utf8) if you intend on having the output show the proper character encoding. If you change the server codepage to 65001, then you will not have to add the codepage setting to your master, as it will always use the default.

You will then have to change the codepage for both the WF client web application, and for your application server as well. If you don't have everyone on the same encoding, then strange things can happen to your output.

You should probably verify this with IB Customer Support.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Member
posted Hide Post
Yes, we did all necessary configurations to support UTF-8 on WebFocus client and report server.

The problem lies with the data in hexadecimal format. If WebFocus doesn't provide functions to convert data from hexadecimal to unicode string, I may have to use Oracle UNISTR('string') function to convert the data first.


WebFOCUS 8.2
Windows Server 2016
PDF, Excel
 
Posts: 11 | Registered: June 08, 2017Report This Post
Expert
posted Hide Post
Do you have an adapter for Oracle ?

If so, then you should be able to use use:
SQL SQLORA
SELECT UNISTR('string');
END
etc


To convert within WebFOCUS


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
You might also be able to use SQL.UNISTR('string'); within a COMPUTE or DEFINE in your synonym or code.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Converting Unicode Hex String to Unicode Characters

Copyright © 1996-2020 Information Builders