Print Page | Close Window

CodeJock 17.3.0 - Markup issue

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=23231
Printed Date: 25 April 2024 at 9:47am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CodeJock 17.3.0 - Markup issue
Posted By: yt-def
Subject: CodeJock 17.3.0 - Markup issue
Date Posted: 26 December 2016 at 10:23am
Hello guys Smile,

I don't know if it's the right place to post it. If it's not, forgive me Confused.

We used ActiveX Suite Pro 12.0.2 to create our app' and we still use it.
We would like to upgrade to a newer version, that's why I downloaded the latest one : Suite Pro for ActiveX Trial 17.3.0
I tested it in our app and I noticed that markup (in the TreeView object for example) doesn't allow accents (é, è, à, etc) and some other characters (it worked with the activated version (12.0.2)).
Is this a bug or just because of the Suite Pro for ActiveX Trial ?
Thanks for your answers.

Some informations : VB6 - W7 32 Bits

Best regards,

yt-def



Replies:
Posted By: cpede
Date Posted: 27 December 2016 at 10:57am
Yes, I also noticed  change in the latest versions, which broke my markup when using non-ASCII characters, accents, symbols etc. However I could fix this by using the XML name or Unicode number, please see: http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references" rel="nofollow - https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references .

-cpede



-------------
Product: Xtreme ToolkitPro (20.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)


Posted By: gibra
Date Posted: 07 January 2017 at 4:49am
I confirm that this is a BUG introduced by 17.0.0 version (up to 16.4.0 no problem).

@cpede
Obviously it is impossible to predict an instant translation of all the strange characters used in each language. Confused




-------------
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8


Posted By: yt-def
Date Posted: 01 February 2017 at 5:08am
Originally posted by gibra gibra wrote:

I confirm that this is a BUG introduced by 17.0.0 version (up to 16.4.0 no problem).

@cpede
Obviously it is impossible to predict an instant translation of all the strange characters used in each language. Confused




Thanks for your answer cpede Smile. I tested the 16.3.1 Evaluation version and indeed there's no problem.
Anyone from Codejock is able to tell me if a fix will be released soon ?


Posted By: cpede
Date Posted: 09 February 2017 at 9:25am
Any progress on this issue?

-cpede


-------------
Product: Xtreme ToolkitPro (20.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)


Posted By: yt-def
Date Posted: 06 March 2017 at 11:37am
Any progress ?

yt-def


Posted By: cpede
Date Posted: 11 March 2017 at 4:06am
Any fix to this problem. We can't release software with v17.3.0 since e.g. the pinned recent file list can't show the names of the files when they include non ASCII characters.

-cpede


-------------
Product: Xtreme ToolkitPro (20.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)


Posted By: astoyan
Date Posted: 13 March 2017 at 1:44pm
There is no problem in Markup in 17.3.0, most likely you have your markup saved incorrectly. Prior to 17.0 Markup used a custom implemented XML parser that allowed improperly saved XML to be used in an application like a valid one. Introducing the standard parser in 17.0 fixed the root problem but made some legacy XAML incompatible.

I have added French accent symbols to Xtreme SuitePro ActiveX v17.3.0\Samples\Common\VB\MarkupPad\Markups\Welcome.xaml and opened it in MarkupPad VB sample, here is the screenshot:


So, as a solution, please make sure you use a proper XML/XAML editor and use save a file as UTF-8 and to make sure specify this in XML header as:
<?xml encoding="utf-8" ?>


Posted By: cpede
Date Posted: 13 March 2017 at 3:27pm
OK, but how do we do this run-time without a file to encode?

Typically I use a MFC CString to generate and set the Markup text.

Does it require that I run Unicode or wide-character for the markup text?

-cpede


-------------
Product: Xtreme ToolkitPro (20.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)


Posted By: gibra
Date Posted: 13 March 2017 at 4:39pm
Originally posted by astoyan astoyan wrote:

There is no problem in Markup in 17.3.0, most likely you have your markup saved incorrectly. 

Sorry, but You are wrong. Ouch

I don't use any saved XML/XAML.
I use simply only code. Example, I have a function which return a markup string:

Public Function GetMarkup(ByVal pString As String, Optional ByVal pColor As String = "Gold", Optional ByVal pFontSize As Long = 13) As String
    Dim pMessage As String
    If pString = vbNullString Then Exit Function
    
    pMessage = pString
    pMessage = Replace(pMessage, "<b>", "<Bold>")
    pMessage = Replace(pMessage, "</b>", "</Bold>")

    pMessage = Replace(pMessage, "<u>", "<Underline>")
    pMessage = Replace(pMessage, "</u>", "</Underline>")
    
    pMessage = Replace(pMessage, "<i>", "<Italic>")
    pMessage = Replace(pMessage, "</i>", "</Italic>")
    
    pMessage = Replace(pMessage, "<h>", "<Hyperlink>")
    pMessage = Replace(pMessage, "</h>", "</Hyperlink>")
    
    pMessage = Replace(pMessage, "<c>", "<Run Background='" & pColor & "'>")
    pMessage = Replace(pMessage, "</c>", "</Run>")
    
    pMessage = Replace(pMessage, "<r>", "<Run Foreground='Red'>")
    pMessage = Replace(pMessage, "</r>", "</Run>")
    
   ' and so on ...

    GetMarkup = "<TextBlock FontFamily='Segoe UI' FontSize='" & pFontSize & "' HorizontalAlignment='Left'>" & pMessage & "</TextBlock>"
End Function

As you can see, i don't use something like:  <?xml encoding="utf-8" ?>

Prior to v.17.0.0 all worked fine, with any chars.
After v. 17.0.0 all chars with accents will made a wrong markup string. 

Example, the next statement (with accents):
GetMarkup("è ora di andare giù")
used in a TaskDialog, become:
<TextBlock FontFamily='Segoe UI' FontSize='13' HorizontalAlignment='Left'>è ora di andare giù</TextBlock>

and produce the wrong results:

While, when I remove accents from phrase:
GetMarkup("e' ora di andare giu'")
produce the correct results:


I haven't changed nothing, only Codejock version has changed. LOL

Please, solve because my language (italian) use a lot of accents. 



-------------
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8


Posted By: adrien
Date Posted: 13 March 2017 at 5:56pm
CJ 17 became more strict in terms of XAML parsing and some broken XAML which was tolerated in earlier versions no longer renders.

If you don't have an <xml ....> tag, then you don't have XAML, why don't you try adding one.  You could use markup pad to see what you need to have in there in order to be valid XAML.


-------------
http://www.wingate.com - http://www.wingate.com


Posted By: gibra
Date Posted: 14 March 2017 at 2:59pm
So I'm right.  
It's Codejock that has changed method. 

However, in all Codejock *.xaml samples the string:
<?xml encoding="utf-8" ?>
is missing. LOL

I've tried to add it on my function, but the result is wrong.
Show me how to add the above xml tag, please.

Thank.


-------------
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8


Posted By: gibra
Date Posted: 16 March 2017 at 11:47am
No samples?

-------------
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8


Posted By: cpede
Date Posted: 16 March 2017 at 5:16pm
OK, now I tested my own theory. Looking at the MarkupPad code, it can be seen that it actually converts the text to unicode before parsing. If I make the following change in the code for my overwritten class CDXXTMarkupStatic : public CStatic, public CXTPMarkupContext it works
m_pUIElement = Parse(T2CW(pszMarkup));
//m_pUIElement = Parse(pszMarkup);
So, somehow the parser has changed?

Also notice that XTToolkit has two versions of Parse:
CXTPMarkupUIElement* Parse(LPCSTR lpszBuffer);
CXTPMarkupUIElement* Parse(LPCWSTR lpszBuffer);
-cpede


-------------
Product: Xtreme ToolkitPro (20.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net