Emile Schwarz
2011-06-06 18:26:06 UTC
Hi all,
I have some troubles using non ASCII characters in a folder (directory)
name.
In one of the sources folders, I had originally two special quotes: '“'
and '”'. I use that file name to create my image files stored in a
destination folder using also that file name and I print text from that
file name inside the image files (png).
Only the images files created in the Target folder suffer from a
trouble. Read below:
Source text:
éèàñ“”-“Rubber”
Created image files in the Target folder:
éèàñ“”-“Rubber”
Note:
The source folder name is loaded from the FolderItem reference and
stored in a TextField.
I extract from the TextField and use it:
in the Target folder name,
in the generated image file as part of the file name (png)
printed inside the png file.
Only when I use the string as a file name I reach the above behavior.
About the code:
---------------
1. To extract the needed informations I use: CharName =
NthField(TFTargetFolderName.Text," -", 1)
I take 3 different informations; StoryName =
NthField(TFTargetFolderName.Text," -", 3) is the one used to get the
information that will be used as file name for the png files (where the
problem lies).
2. To print that text inside each of the generated images (png) files, I
used:
OffscreenObj.Graphics.DrawString StoryName,(PagePosRight -
PageNumWidth)-PagePosLeft,PagePosTop-4
3. I create the generated image file name using:
PageName = StoryName + " " + Format(PageNumber,"000") + ".png"
SavePagesFI.Child(PageName).SaveAsPicture(OffscreenObj,FolderItem.SaveAsPNG)
// Save the Picture on disk in a png file
I have removed the file name stripper because the error existed before I
added it.
That is all what I can say about my code corresponding to the trouble I see.
Of course, at this stage in the development, I am the only one to use
the application, a simple ReplaceAll AppleScript let me do what I want.
But this is not really a way to develop things.
Last but not least, REAL Studio use the UTF-8 encoding internally, so I
am supposed to not mind of that when I write applications. On the other
hand, the characters appears correctly in the TextField and in two other
places BUT fails when used as a file name.
Any idea ?
Emile
PS: Used software / hardware
MacBook 13" / 2.4GHZ / 2008-11
Mac OS X 10.6.7
REAL Studio Enterprise Edition 2009r5.1
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.
I have some troubles using non ASCII characters in a folder (directory)
name.
In one of the sources folders, I had originally two special quotes: '“'
and '”'. I use that file name to create my image files stored in a
destination folder using also that file name and I print text from that
file name inside the image files (png).
Only the images files created in the Target folder suffer from a
trouble. Read below:
Source text:
éèàñ“”-“Rubber”
Created image files in the Target folder:
éèàñ“”-“Rubber”
Note:
The source folder name is loaded from the FolderItem reference and
stored in a TextField.
I extract from the TextField and use it:
in the Target folder name,
in the generated image file as part of the file name (png)
printed inside the png file.
Only when I use the string as a file name I reach the above behavior.
About the code:
---------------
1. To extract the needed informations I use: CharName =
NthField(TFTargetFolderName.Text," -", 1)
I take 3 different informations; StoryName =
NthField(TFTargetFolderName.Text," -", 3) is the one used to get the
information that will be used as file name for the png files (where the
problem lies).
2. To print that text inside each of the generated images (png) files, I
used:
OffscreenObj.Graphics.DrawString StoryName,(PagePosRight -
PageNumWidth)-PagePosLeft,PagePosTop-4
3. I create the generated image file name using:
PageName = StoryName + " " + Format(PageNumber,"000") + ".png"
SavePagesFI.Child(PageName).SaveAsPicture(OffscreenObj,FolderItem.SaveAsPNG)
// Save the Picture on disk in a png file
I have removed the file name stripper because the error existed before I
added it.
That is all what I can say about my code corresponding to the trouble I see.
Of course, at this stage in the development, I am the only one to use
the application, a simple ReplaceAll AppleScript let me do what I want.
But this is not really a way to develop things.
Last but not least, REAL Studio use the UTF-8 encoding internally, so I
am supposed to not mind of that when I write applications. On the other
hand, the characters appears correctly in the TextField and in two other
places BUT fails when used as a file name.
Any idea ?
Emile
PS: Used software / hardware
MacBook 13" / 2.4GHZ / 2008-11
Mac OS X 10.6.7
REAL Studio Enterprise Edition 2009r5.1
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.