rendered text conundrum
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 254
- Joined: Mon Apr 16, 2007 12:06 am
- Location: USA
- Contact:
rendered text conundrum
I have a unique issue that is plaguing me, I created an encrypted text file that should work across platforms, in the past it has done so with no problems, however with the newest version, 4.0 this no longer is the case, so obviously some change occurred that has created some change in the way text is rendered, across platforms.
For example, if I use the SSL library, and encrypt some text on MAC OSX
I can take that same encrypted text to windows and it can then be decrypted using a key or salt value.
However, if I then take and produce the same text and encrypt it on windows, and attempt to decrypt it on MAC osx, failure is the result, in fact the application I created to make this happen, fails to even load, on MAC OSX, when attempting to load encrypted text from a windows machine.
This suggests that there is something happening when the text is rendered from a field created on a windows machine,)
hmmmm, I am completely lost on this one, sorry that there are not more details, but I know that it works fine in the IDE,
But when an attempt as mentioned above is tried, there is obviously some problem with the way that text is rendered from windows to the MAC osx environment, any thoughts or ideas or suggestions,
I know it may be difficult to fully grasp this without the code, but I just have no idea where to even start, the engine used to transcribe text automatically, is this not the case any longer?
or is it something else that I am missing.
encrypted text should not be transcribed from operating system to operating system, but I think it may be what is happening, just thought I would put that out there in case anyone had a thought to share on that,
For example, if I use the SSL library, and encrypt some text on MAC OSX
I can take that same encrypted text to windows and it can then be decrypted using a key or salt value.
However, if I then take and produce the same text and encrypt it on windows, and attempt to decrypt it on MAC osx, failure is the result, in fact the application I created to make this happen, fails to even load, on MAC OSX, when attempting to load encrypted text from a windows machine.
This suggests that there is something happening when the text is rendered from a field created on a windows machine,)
hmmmm, I am completely lost on this one, sorry that there are not more details, but I know that it works fine in the IDE,
But when an attempt as mentioned above is tried, there is obviously some problem with the way that text is rendered from windows to the MAC osx environment, any thoughts or ideas or suggestions,
I know it may be difficult to fully grasp this without the code, but I just have no idea where to even start, the engine used to transcribe text automatically, is this not the case any longer?
or is it something else that I am missing.
encrypted text should not be transcribed from operating system to operating system, but I think it may be what is happening, just thought I would put that out there in case anyone had a thought to share on that,
Re: rendered text conundrum
Yup, I think you need to post your current (failing) script, reelstuff.
Best,
Mark
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- VIP Livecode Opensource Backer
- Posts: 254
- Joined: Mon Apr 16, 2007 12:06 am
- Location: USA
- Contact:
Re: rendered text conundrum
snip
Last edited by reelstuff on Wed Dec 09, 2009 11:14 pm, edited 1 time in total.
Re: rendered text conundrum
reelstuff,
Try replacing
with
Best,
Mark
Try replacing
Code: Select all
put aData into URL ("file:" & it & myVar)
Code: Select all
put aData into URL ("binfile:" & it & myVar)
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: rendered text conundrum
Also, you could try to utf-8-encode the plaintext before encryption.
Decryption would have to be followed by utf-8-decode.
That should give you platform-independency.
(You might even try URL-encode and URL-decode instead of utf8-)
regards
Decryption would have to be followed by utf-8-decode.
That should give you platform-independency.
(You might even try URL-encode and URL-decode instead of utf8-)
regards
-
- VIP Livecode Opensource Backer
- Posts: 254
- Joined: Mon Apr 16, 2007 12:06 am
- Location: USA
- Contact:
Re: rendered text conundrum
Of course, Bangs head...Mark wrote:reelstuff,
Try replacing
withCode: Select all
put aData into URL ("file:" & it & myVar)
Best,Code: Select all
put aData into URL ("binfile:" & it & myVar)
Mark
![Embarassed :oops:](./images/smilies/icon_redface.gif)
Yes, that would do it, allright, LOL
-
- VIP Livecode Opensource Backer
- Posts: 254
- Joined: Mon Apr 16, 2007 12:06 am
- Location: USA
- Contact:
Re: rendered text conundrum
Thanks for the reply, yes, I can see that would make a difference I will try both of those out, thanks again.ukimiku wrote:Also, you could try to utf-8-encode the plaintext before encryption.
Decryption would have to be followed by utf-8-decode.
That should give you platform-independency.
(You might even try URL-encode and URL-decode instead of utf8-)
regards
-
- VIP Livecode Opensource Backer
- Posts: 254
- Joined: Mon Apr 16, 2007 12:06 am
- Location: USA
- Contact:
Re: rendered text conundrum
I took a look at the stack code and it is impressive, I started with the binary issue first, as this was the most likely culprit,reelstuff wrote:Thanks for the reply, yes, I can see that would make a difference I will try both of those out, thanks again.ukimiku wrote:Also, you could try to utf-8-encode the plaintext before encryption.
Decryption would have to be followed by utf-8-decode.
That should give you platform-independency.
(You might even try URL-encode and URL-decode instead of utf8-)
regards
it turned out that this did not allow cross platform use, interesting, because in the past I know that I was able to make this work from one platform to another.
I will have to take a closer look at your suggestions, but it may be above my pay grade, LOL
Re: rendered text conundrum
Hi Reelstuff,
not a paygrade issue![Smile :)](./images/smilies/icon_smile.gif)
You will find a special utf-encode and decode function in the Blowfish stack that you downloaded. You can use it even more easily than the Blowfish routines, since you don't need to provide any key for encoding and decoding.
I think you would benefit from utf-8 encoding since non-basic ASCII characters like ÄÖÜäöüß, ÉÈÊéèêâô and the like will be encoded properly and preserved across platforms.
I suppose English is not your native language? May I ask where you are located?
Regards
not a paygrade issue
![Smile :)](./images/smilies/icon_smile.gif)
You will find a special utf-encode and decode function in the Blowfish stack that you downloaded. You can use it even more easily than the Blowfish routines, since you don't need to provide any key for encoding and decoding.
I think you would benefit from utf-8 encoding since non-basic ASCII characters like ÄÖÜäöüß, ÉÈÊéèêâô and the like will be encoded properly and preserved across platforms.
I suppose English is not your native language? May I ask where you are located?
Regards
-
- VIP Livecode Opensource Backer
- Posts: 254
- Joined: Mon Apr 16, 2007 12:06 am
- Location: USA
- Contact:
Re: rendered text conundrum
Thanks again, for your post,
I am located in the USA,
Yes, I think you are right about the utf-8 encoding
I am located in the USA,
Yes, I think you are right about the utf-8 encoding
I think you would benefit from utf-8 encoding since non-basic ASCII characters like ÄÖÜäöüß, ÉÈÊéèêâô and the like will be encoded properly and preserved across platforms.