Author Topic: [Solved] 1.) codepage encoding -2.) accelerator key  (Read 1622 times)

Offline Evi01

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
[Solved] 1.) codepage encoding -2.) accelerator key
« on: February 17, 2009, 09:54:11 pm »
When I made a new project, set the codepage 852, and the program has not saved the 852 codepage. Instead, the program openened my every files in project with unicode. I use clipper syntax for console programming. When I tried over again to set the 852 codepage, the hippoedit has crashed.
Sorry my poor english.
 
« Last Edit: April 11, 2009, 12:27:39 pm by Stefan »

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: codepage
« Reply #1 on: February 18, 2009, 12:01:20 am »
Hello Evi01,

1) Which HippoEDIT version you are using?
2) You have set Encoding for project via Project Settings? In my case, with 1.42.617 encoding was saved.
3) I have found a bug that project encoding was not applied to new document. Would be corrected with next beta.
4) For existing files, project encoding should be used only as fall back, if encoding  of document could not be determined from content. If detectection is incorrect, change it for this document with Context menu or Status bar. It would be saved and used next time.
5)
Quote
When I tried over again to set the 852 codepage, the hippoedit has crashed
How to reproduce this? Can you please provide step by step instruction? You have changed project settings once more? Please try to retest with 1.42 beta, if error still exist, write how to reproduce. I would fix this as soon as possible.

Your English is enough to explain the problem ;)
And where you got a Clipper schema? ;) I am also interested in it :)

Offline Evi01

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: codepage
« Reply #2 on: February 18, 2009, 02:10:43 am »
There was no problem with version 1.33. Just 1.4 and 1.41 versions.
I have uninstalled the 1.4 and 1.41 versions, because the problem I wrote. Now I use the 1.33 version and this work right. (But I would like to use the new version). If possible, I will send pictures from the error.

I wrote myself the Clipper shema. I looked other shemas and I did one. And you have to do something with your clipper files: There is a problem with clipper language. Sometimes you use "RETURN" not just in the end of a "Function". For example: "IF a = 1; RETURN Nil; ENDIF". A Scope starts with "Function" and ends with "Return".
You have to  use:
"#DEFINE RETURNO RETURN"
and: "IF a = 1; RETURNO Nil..." and scope will work perfectly.
If you want, I likely send this file for you. (How can I send this?)

I have put this xml file into the syntax directory before running HippoEdit 1.33 in the first time. It worked well.

I have hungarian keyboard. I have to press alt+v keys to write @ character, and alt+b keys to write { character, etc. When I try to use this keys, hippoedit program menu appears, and I can't write these characters with keyboard. It is my other problem.

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 772
  • Karma: +6/-0
    • View Profile
Re: codepage
« Reply #3 on: February 18, 2009, 08:31:52 am »
Hi Evi, welcome to the community  :D
First do me a favor and open new threads for each separate topic
to not mixed up replies and discusses, and as addition others can easier find this
if they have  the same issue and if the search the forum by thread subject.
This is not always easy to do, i know, i know very well, but at least we can try  ;D

I have hungarian keyboard.
I have to press alt+v keys to write @ character,
and alt+b keys to write { character, etc.
When I try to use this keys, hippoedit program menu appears, and I can't write these characters with keyboard.
It is my other problem.

@Alex,
afaik the "standard" to open an drop-down menu
is to press ALT-key, (then the menu is now focused) followed by that underlined char we see in the menu name, as second key-press.
(O.K., mostly we press this two keys together too, but that is not really necessary)

But now i see as Evi does, that this not work in HippoEDIT 610, here i have to press ALT+char together to access the menu.

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: codepage
« Reply #4 on: February 19, 2009, 12:51:06 am »
Hello Evi01 and Stefan,

problem with such extended keys I hve understood and reproduced. I think, for German keyboard same problem would be when using AltGrey + Q for @. Also susch combinations are not recognized by HippoEDIT as char input but as accelerator keys. And because of that you would wraning message in status something is not a shortcut. This is also wrong. I have fixed this, would be available with new beta. Also now pressing + releasing Alt would activate menu, if nothing in between was done (no jeys pressed and no mouse moves).

@To Evi:
You can send files to supportbox at hippoedit com. Providing of new syntax schema give you the right for free license. If you like of course ;)
Added: Ok, I got a schema. Would check and respond. + can you please send me a file that cause screen damage (cikk.prg) + template.

With project encoding bug, I would ask you to retest with new beta (would be available next days) and then we can check scenario step by step, if something would fail.
« Last Edit: February 19, 2009, 01:53:22 am by alex »

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 772
  • Karma: +6/-0
    • View Profile
Re: codepage
« Reply #5 on: February 22, 2009, 09:40:34 pm »
619
>now pressing + releasing Alt would activate menu,
But the file menu is shown immediate.
I mean with ALT-key pressed the menu should only be activated, not pop-up any menu, but waiting for an second key or ESC to abort.
The menu should  be shown only if i press the accelerator key.
Or if i press Alt+accelerator key together, ..... but only if there is no internal shortcut with Alt + that key set.

Because,
If i want to open View menu and press and release Alt-key followed by v-key i execute File>Save as...

---

This should  now works for Evi too.
If i press Alt+T my Clipboard-History-Tool appears instead of the HE Tools-menu because of system-width hotkey.
So i guess hes Alt+v / Alt+b should be executed first before they are delivers to HippoEDIT.
« Last Edit: February 22, 2009, 09:47:40 pm by Stefan »

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: codepage
« Reply #6 on: February 23, 2009, 12:21:58 pm »
Hello Stafan,

yes, you are right. Now I see the problem.

The menu is activated if you press and realease Alt and does not press any accelerator key in between (or did the mouse click, that can be column mode selection).
I thought it would be no problem if menu is alread open on release of Alt (in such way it was easier to implement), but now I see the usecase and would correct the bahaviour.

Thanks a lot!

Offline Evi01

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: codepage
« Reply #7 on: March 15, 2009, 12:44:56 am »
Hello,
I set Options/Document/Encoding 852 (East Europe, DOS). I use this with my projects, too, and I saved my projects with this codepage. In the two last beta, I set it in vain, the files are opening with different codepages. (1250, 962, 1252, sometimes with 852 etc. I think, with automatic encoding) I made new projects and set the codepage again, but nothing changed.  :(
And finally, I deleted the new beta, and installed the beta made on 05.03.2009. It works well. I can open all my files with my codepage.
I think, it is a bug in the new beta.

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: codepage
« Reply #8 on: March 15, 2009, 01:16:01 pm »
Hello Evi,

I would say that HippoEDIT works as designed. Some versions BEFORE there was a bug. And in latest betas I have fixed it.
I see that it works not like you have expected but from my point of view logic is correct. But if somebody would prove that it is wrong, well then I can change it :) But first I would try to explain the logic how and then which setting is used:

Some preconditions:
1) File can have one encoding (same as code page), encoding cam be as unicode UTF16 LE, BE (1200, 1201), UTF8 (65000) as not unicode as 1252 (Western European) etc.
2) There are several places, where encoding conversion can be applied to document: Open, Save As, New, Search and Replace
3) There are several places where encoding can be selected/changed: File Open/Save dialog, via context menu or status bar, in Project Settings, in Tools->Options->Document settings, in syntax specification (here you can set as prefferd encoding, as forced encoding). In addition to this HippoEDIT does an autodetection of the encoding using different algorithms (Check BOM bytes, statistics test for UTF16 LE/BE, statistics test for UTF8, check by encoding strings and same checks as IE uses).
4) If encoding for document once changed by user, this preference has priority over all the rest of settings. Preferences is machine specific, and could be some when lost if HippoEDIT temp files would be deleted or format of them would chnage in new version.

So, how all this works togeter (or designed to work :) ) :
1) New File encoding selection
  • Syntax force encoding
  • Current Project settings encoding
  • Document settings encoding
  • Syntax preffered encoding
  • System local encoding

2) Open File encoding selection
  • Syntax force encoding
  • Encoding selected in File Open dialog
  • Auto-detected encoding with usage of all algorithms mentioned above. Set of applied algorithms can be chnaged in settings.xml
  • Syntax preffered encoding
  • Project settings encoding taken
  • Document setting encoding
  • System local encoding

3) Save File encoding selection
  • Encoding selected in File Save dialog
  • Current document encoding
  • During save HippoEDIT checks consistance of current document encoding and encoding found with encoding strings (XML, HTML etc). If encoding does not match, user would be asked to select which encoding to use
  • Because HippoEDIT inernally works with Unicode representation of text (UTF16 LE), on save can happen then current text could not be saved without lost of information in current selected encoding. In this case HippoEDIT should pop-up a warning informing user about possible data loss and suggest to save document as Unicode or using some another encoding. This behaviour controlled by flag Check encoding accuracy in Tools->Options->Formatting

4) Search and Replace encoding uses same logic as for Open/Save file just interactive selection of encoding with Open/Save dialog not available.

So, if you see that documents are open in wrong encoding, you have seveal choices:
1) Explicitely select correct encoding in File Open dialog
2) Set for syntax you use forced encoding:
Code: [Select]
<Encoding default="852" force="true"/>in SPECIFICATION section of schema spec file.
3) Disable extended auto-detection (IE algorithms), it can return wrong result if data for analysis is not sufficient.
settings.xml, section General
Code: [Select]
<EncodingDetectionExtended>false</EncodingDetectionExtended>

Best regards,
Alex

P.S: I would copy most part of the message to FAQ section.

Offline Evi01

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: codepage
« Reply #9 on: March 15, 2009, 03:08:35 pm »
Thank you, Alex
I put the encoding default into my schema, and it is working perfectly! Thank you again. :)

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
665 Views
Last post March 15, 2009, 01:20:23 pm
by alex
5 Replies
619 Views
Last post April 16, 2009, 10:06:52 pm
by Arthur
8 Replies
645 Views
Last post May 04, 2009, 11:09:34 pm
by alex
2 Replies
393 Views
Last post July 29, 2009, 02:05:57 pm
by samuel1991
0 Replies
81 Views
Last post November 02, 2011, 12:29:00 am
by alex