minor bug? cut&paste text with umlauts into Template Studio

Posts   
 
    
oki
User
Posts: 27
Joined: 12-Sep-2007
# Posted on: 14-Feb-2008 11:47:41   

I'm using Template Studio 2.5.09242007 Final.

When I'm pasting Text with german umlauts (e.g.: ä ö ü ) from Visual Studio 2005 into a open Template (*.lpt-File) within the Template Studio, the umlauts are scrabled into 2 Chars. ( ä ö ü [Just cut&pasted] ) It seems like the Unicode Chars in the Clipboard are inserted as ascii Chars.flushed

The way back (from Template Studio to Visual Studio) is working correctly.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39774
Joined: 17-Aug-2003
# Posted on: 14-Feb-2008 13:09:06   

I can't reproduce it. I've copied your 3 characters to vs.net and then copied that text to a .lpt template and it worked OK. What encoding do you use (first item in preferences)

Frans Bouma | Lead developer LLBLGen Pro
oki
User
Posts: 27
Joined: 12-Sep-2007
# Posted on: 14-Feb-2008 13:24:29   

Thank you for the fast reply.

Template Studio : - TextEncoding UTF8 - Output Settings of loaded .prj preferences: UTF8

oki
User
Posts: 27
Joined: 12-Sep-2007
# Posted on: 14-Feb-2008 13:50:21   

maybe I got it: I'm using your ASP.NET 2.0 GUI generator templates (Adapter / C#) from: http://www.llblgen.com/pages/secure/filestreamer.aspx?DownloadID=80 as basis. Some (e.g. SD_AppCodeInterfaces) of them are maybe ascii coded. Maybe after codegeneration the ~\App_Code\Interfaces.cs is also ASCII coded. Don't know how to check this in VS2005.

Cut&Paste from these files to Notepad works correct. but not to Template Studio.

Cut&Paste from not generated files (created in vs2005) with umlauts to the same template-File are working confused

Walaa avatar
Walaa
Support Team
Posts: 14987
Joined: 21-Aug-2005
# Posted on: 14-Feb-2008 14:25:54   

Maybe after codegeneration the ~\App_Code\Interfaces.cs is also ASCII coded. Don't know how to check this in VS2005.

To check the encoding of a file in VS 2005 or change it do the following: 1- Goto File -> Save As 2- When the Save As Dialog opens, click on the small black arrow in the Save Button. 3- Select Save with Encoding. 4- A Window will pop-up with the current Encodeing Selected.

oki
User
Posts: 27
Joined: 12-Sep-2007
# Posted on: 14-Feb-2008 14:45:59   

Thank you for the howto "fileencofing in vs"wink : new files in vs2005 are cp1252 encoded. the llblgen generated Files are utf8 (cp65001) encoded. the .lpt files are utf8 (cp65001) encoded.

"direct" cut&paste with vs2005 Files (cp1252) to Template Studio are working.

"indirect" cut&paste from cp65001 sources to Notepad and then cut & paste from Notepad to Template Studio works. confused

It's a cut&paste "feature" with cp65001 encoded-sources to Template Studio.

Walaa avatar
Walaa
Support Team
Posts: 14987
Joined: 21-Aug-2005
# Posted on: 14-Feb-2008 15:13:40   

I'm confused now, which scenario doesn't work?

oki
User
Posts: 27
Joined: 12-Sep-2007
# Posted on: 14-Feb-2008 15:40:13   

Working cut&paste: a) Mark snippet in vs2005 created code *.cs-Files (cp1252 encoded) and cut (ctl + x) this to clipboard. Paste (ctl + v) it into Template Studio. b) Cut (ctl + x) from llblgen generated Files (utf8 - cp65001 encoded). Open Notepad and paste (ctl-v) text into notepad.
Mark all Text in notepad (ctl + a), cut the text (ctl + x) from notepad. Paste (ctl + v) the text to Template Studio.

not working as aspected with umlauts : c) mark snippet in vs2005 from a llblgen generated Files (utf8 - cp65001 encoded) Cut marked snippet to clipboard (ctl + x). In Template Studio paste (ctl + v) clipboard content to open *.lpt file. (utf8 - cp65001 encoded) d) mark snippet of a created web.config or *.aspx file in vs2005 (will be utf8 encoded) cut them in VS2005 and paste to Template Studio

Scenario "c" and "d" doesn't work.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39774
Joined: 17-Aug-2003
# Posted on: 14-Feb-2008 17:19:30   

I think it's a problem with the editor control used, SyntaxEdit. Or better: how's setup. Unicode support has been switched off in the properties. I'll check if I can repro it and then if switching that on fixes it.

(edit) Enabling it will indeed fix it. I'll upload a new build of template studio. Hang on.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39774
Joined: 17-Aug-2003
# Posted on: 14-Feb-2008 17:30:58   

I've uploaded a new version. Could you please try that new build of template studio v2.5 ?

Frans Bouma | Lead developer LLBLGen Pro
oki
User
Posts: 27
Joined: 12-Sep-2007
# Posted on: 14-Feb-2008 18:20:09   

sorry, still scambling. cry

OT: have you ever used copy&paste in a long row (>200chars) in Template Studio?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39774
Joined: 17-Aug-2003
# Posted on: 14-Feb-2008 18:52:26   

oki wrote:

sorry, still scambling. cry

Hmm. I couldn't reproduce it after switching on unicode support on the editor control.

OT: have you ever used copy&paste in a long row (>200chars) in Template Studio?

Not sure, probably. What happens?

Frans Bouma | Lead developer LLBLGen Pro
oki
User
Posts: 27
Joined: 12-Sep-2007
# Posted on: 14-Feb-2008 19:29:15   

Otis wrote:

Hmm. I couldn't reproduce it after switching on unicode support on the editor control.

oops, my fault. haven't closed the Designer - thought that they are independent.

Otis wrote:

Not sure, probably. What happens?

marking parts in that kind of rows the control is scrolling in the predefined stepsize. This is OK, if you mark text from left (begin) to right (end). But if you mark from right to left it's really not usable.

For the next level: Try this with your mouse and not with the keyboard.

vs2005 reduce the stepsize to 1 in this case.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39774
Joined: 17-Aug-2003
# Posted on: 14-Feb-2008 20:38:50   

oki wrote:

Otis wrote:

Hmm. I couldn't reproduce it after switching on unicode support on the editor control.

oops, my fault. haven't closed the Designer - thought that they are independent.

They are... you now can't reproduce it or is it still present? I tried it with copying from a file in vs.net with the 65001 encoding to a template and I first could reproduce it, and after the fix I couldn.

Otis wrote:

Not sure, probably. What happens?

marking parts in that kind of rows the control is scrolling in the predefined stepsize. This is OK, if you mark text from left (begin) to right (end). But if you mark from right to left it's really not usable.

For the next level: Try this with your mouse and not with the keyboard.

vs2005 reduce the stepsize to 1 in this case.

Hmm, so selecting text from right to left and then copying a long line gives problems. I don't fully understand what you mean with stepsize though.. flushed

Frans Bouma | Lead developer LLBLGen Pro
oki
User
Posts: 27
Joined: 12-Sep-2007
# Posted on: 15-Feb-2008 10:37:14   

Otis wrote:

They are... you now can't reproduce it or is it still present? I tried it with copying from a file in vs.net with the 65001 encoding to a template and I first could reproduce it, and after the fix I couldn.

You've fixed it. simple_smile I just closed the Template Designer, copied the new Designer, started the Designer and tested: it was still existing.

After all I closed all SD-Apps, and tried again: .... and .. it's working. simple_smile [quote]

Otis wrote:

Hmm, so selecting text from right to left and then copying a long line gives problems. I don't fully understand what you mean with stepsize though.. flushed

I thought that the Syntax Editor-Control, you use in Template Designer, has a Property "stepsize" for the scroll. (Should this control use a smooth scrolling with a predefined speed or use a scroll-step of a predefined size [e.g. 10 Chars] )

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39774
Joined: 17-Aug-2003
# Posted on: 18-Feb-2008 11:04:36   

Ah ok.

Here it scrolls with lines, not smooth scroll. I therefore don't think the stepsize is the cause of what you're seeing...

Frans Bouma | Lead developer LLBLGen Pro