Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Conversion from CharString to Universal Charstring
Conversion from CharString to Universal Charstring [message #1819566] Fri, 17 January 2020 11:47 Go to next message
SUBHAJIT SAHA is currently offline SUBHAJIT SAHAFriend
Messages: 1
Registered: January 2020
Junior Member
Hi,

I am new to Eclipse TITAN and ttcn3.
Is there any ways to convert 'charstring' to 'universal charstring' ?
Thanks
Re: Conversion from CharString to Universal Charstring [message #1819590 is a reply to message #1819566] Fri, 17 January 2020 16:37 Go to previous messageGo to next message
Axel Rennoch is currently offline Axel RennochFriend
Messages: 9
Registered: August 2014
Junior Member
Hi SUBHAJIT SAHA,

please consider to apply the predefined conversion function of TTCN-3 defined in annex C of part 1 of the TTCN-3 multi-part standard.

Ciao,
Axel
Re: Conversion from CharString to Universal Charstring [message #1819613 is a reply to message #1819590] Sat, 18 January 2020 10:15 Go to previous messageGo to next message
Kristof Szabados is currently offline Kristof SzabadosFriend
Messages: 60
Registered: July 2015
Member
Hi SUBHAJIT SAHA,

Could you provide us with a bit more information on the context?

In general where a universal charstring is expected you can also provide a charstring, and the conversion will happen during the assignment automatically.
for example, this is ok:
  var charstring v_charstring := "hello";
  var universal charstring v_uni := v_charstring;
  v_uni := "hello again";
Re: Conversion from CharString to Universal Charstring [message #1826341 is a reply to message #1819613] Thu, 23 April 2020 17:29 Go to previous messageGo to next message
Sascha Hackel is currently offline Sascha HackelFriend
Messages: 6
Registered: October 2017
Location: Berlin
Junior Member
Hi SUBHAJIT SAHA,

the question may be solved but for future questions related to this topic:

You can also use the function f_charstr2unichar in the repo TCCUsefulFunction (module TCCConversion_Functions.ttcn).

Best regards,
Sascha

[1] https://github.com/eclipse/titan.Libraries.TCCUsefulFunctions/blob/master/src/TCCConversion_Functions.ttcn
Re: Conversion from CharString to Universal Charstring [message #1826642 is a reply to message #1826341] Tue, 28 April 2020 07:00 Go to previous message
Olaf Bergengruen is currently offline Olaf BergengruenFriend
Messages: 127
Registered: November 2018
Senior Member
Hi, in my code for converting universal charstring to charsting, I use:

 oct2char(unichar2oct(v_unichar);


Olaf
Previous Topic:Incorrect decoding of an unaligned bit-field (BIT5)
Next Topic:TITAN Utility from java using eclipse
Goto Forum:
  


Current Time: Sun Sep 22 02:42:37 GMT 2024

Powered by FUDForum. Page generated in 0.03848 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top