[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 611
  • Last Modified:

C/C++/Java source code to string

Hello experts.
I need help to convert this : \u0386\u03b3\u03b9\u03bf\u03c2  
to a string.
Searching in google i found that it is a C/C++/Java source code.

Is there any function in coldfusion to decoded this?
0
Panos
Asked:
Panos
  • 2
  • 2
1 Solution
 
_agx_Commented:
I'm no expert on unicode ..  but I think it's just converting the hex code point to a decimal number, then using chr().  See this thread.

<style type="text/css">
	body { font: Arial Unicode MS; }
</style>
<cfscript>
   charsAsHex = listToArray("\u0386\u03b3\u03b9\u03bf\u03c2", "\u");
   for (i = 1; i <= arrayLen(charsAsHex); i++) {
   	    decimalCodePoint = inputBaseN(charsAsHex[i], 16);
   	    actualCharacter = chr(decimalCodePoint);
   		WriteOutput(decimalCodePoint &" = "& actualCharacter &"<br>");
   }
</cfscript>

Open in new window

0
 
PanosAuthor Commented:
Hi agx.
Your are not an expert on Unicode but you helped me many times with these kind of problems.
Thank you
0
 
PanosAuthor Commented:
Thank you
regards
panos
0
 
_agx_Commented:
Your questions tend to be about interesting stuff, so glad I could help :)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now