Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - CodeJock 17.3.0 - Markup issue
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CodeJock 17.3.0 - Markup issue

 Post Reply Post Reply
Author
Message
yt-def View Drop Down
Newbie
Newbie


Joined: 26 December 2016
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote yt-def Quote  Post ReplyReply Direct Link To This Post Topic: CodeJock 17.3.0 - Markup issue
    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
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Status: Offline
Points: 546
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post 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: https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references.

-cpede

Product: Xtreme ToolkitPro (18.0.1)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
gibra View Drop Down
Senior Member
Senior Member
Avatar

Joined: 31 October 2008
Location: Italy
Status: Offline
Points: 277
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibra Quote  Post ReplyReply Direct Link To This Post 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 17.x
Windows 10 64bit
VS2017 - VB6.0 SP6
VS/VB 6.0 Installer v4.8 for Windows
Back to Top
yt-def View Drop Down
Newbie
Newbie


Joined: 26 December 2016
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote yt-def Quote  Post ReplyReply Direct Link To This Post 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 ?
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Status: Offline
Points: 546
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Posted: 09 February 2017 at 9:25am
Any progress on this issue?

-cpede
Product: Xtreme ToolkitPro (18.0.1)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
yt-def View Drop Down
Newbie
Newbie


Joined: 26 December 2016
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote yt-def Quote  Post ReplyReply Direct Link To This Post Posted: 06 March 2017 at 11:37am
Any progress ?

yt-def
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Status: Offline
Points: 546
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post 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 (18.0.1)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
astoyan View Drop Down
Admin Group
Admin Group
Avatar

Joined: 24 August 2013
Status: Offline
Points: 187
Post Options Post Options   Thanks (0) Thanks(0)   Quote astoyan Quote  Post ReplyReply Direct Link To This Post 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" ?>
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Status: Offline
Points: 546
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post 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 (18.0.1)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
gibra View Drop Down
Senior Member
Senior Member
Avatar

Joined: 31 October 2008
Location: Italy
Status: Offline
Points: 277
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibra Quote  Post ReplyReply Direct Link To This Post 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 17.x
Windows 10 64bit
VS2017 - VB6.0 SP6
VS/VB 6.0 Installer v4.8 for Windows
Back to Top
adrien View Drop Down
Senior Member
Senior Member


Joined: 30 April 2007
Location: New Zealand
Status: Offline
Points: 439
Post Options Post Options   Thanks (0) Thanks(0)   Quote adrien Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
gibra View Drop Down
Senior Member
Senior Member
Avatar

Joined: 31 October 2008
Location: Italy
Status: Offline
Points: 277
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibra Quote  Post ReplyReply Direct Link To This Post 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 17.x
Windows 10 64bit
VS2017 - VB6.0 SP6
VS/VB 6.0 Installer v4.8 for Windows
Back to Top
gibra View Drop Down
Senior Member
Senior Member
Avatar

Joined: 31 October 2008
Location: Italy
Status: Offline
Points: 277
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibra Quote  Post ReplyReply Direct Link To This Post Posted: 16 March 2017 at 11:47am
No samples?
gibra
CJ SuiteControl v: 13.x to 17.x
Windows 10 64bit
VS2017 - VB6.0 SP6
VS/VB 6.0 Installer v4.8 for Windows
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Status: Offline
Points: 546
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post 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 (18.0.1)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.125 seconds.