How to force page code OEM-863 initialized permanently as default ?
-
hello Claudia,
Thank you again for all your informations.
- I understood the meaning of the -L parameter,
- “« The source code is available on github »”: I’m not interested by the source code of Notepad++… only by the source code of the macro created with the option
“Macro => Start recording … Stop recording => Save recorded macro”.
I guess it’s coded in Python. - « Now, ANSI and OEM-863: French - no, npp has no builtin way to do such thing » : I did not really understand what you mean !. But, I try to show you in image what I do manually and that I would like automatic :
First, the "OEM 863 : French is well initialized in Prefrences.
- 1 - I run notepad++,
- 2 - I open a new document, enter accented characters, save as “toto.txt” :
You can see le “OEM-863 : French” is well specified in the status bar, and the accented characters correctly displayed, - 3 - I quit notepad++
- 4 - I run again notepad++,
- 5 - I open “toto.txt”,
You can see ANSI is selected, specified in the status bar and the accented characters are not correctly displayed, - 6 - I do
"Encoding => Character sets => Western European => EOM 863 French
You can see OEM 863 : French is set and the accented characters are good displayed.
Best regards,
Jean-Pierre -
Hello Jean-Pierre
yes, now I understand - a picture say’s more then 1000 words.
Macros are save in shortcuts.xml file, file with some cryptic action messages - no python.
Not sue if this can be done with a macro as setting the code page isn’t exposed with a message
that could be used.Let me think about it.
Cheers
Claudia -
Good evening Claudia,
Following your message, I went right away to see the file “Shorcuts.xml” containing the macros with the “action messages” that you quoted me and also the “Daring Fireball MarkDown documentation” under my eyes.
I am quite surprised by the technical choices. To maintain, it must be amazing! … no?
In these circumstances, I do not think I have an answer to my question. I was just asking for feasibility … so I stay in that way. Too bad for the automaticity of the configuration ! …
I did not find, in my installation notepad ++, the configuration of the plugins Python. I may not be very smart. Maybe i have perhaps to download something too.Anyway, I’m not a Python user. I made my weapons with FreeCad animations. I prefer to continue programming in basic C which is for me is a superb assembler evolved with which we can do everything. It’s not for nothing if the Unix system is written in C except for a few really essential kernel modules written in assembler.
Thanks for your help. Are you developper under notepad++ ?
Best regards
Jean PierreP.S. a little symbol from french home : a little cicada that sings the sun of Provence.
-
Bonjour, Jean-Pierre,
I’m going to speak, a bit, in French but, in the second part, I’ll give some clues to @claudia-frank !
Tout d’abord, note bien que l’option Paramètres > Sauvegarde > Mémoriser la session actuelle est cochée dans ma configuration et que de nombreux fichiers sont, en général, simultanément ouverts dans ma session courant N++ v7.5.6.
-
Donc, Jean-Pierre, j’ai changé le paramètre, concenant les nouveaux documents, de
UTF-8
àOEM 863
. -
J’ai créé un nouveau ficher (
Ctrl + N
) puis ai saisi rigoureusement le même texte que toi et ai sauvegardé ce fichier avec pour nom toto.txt. -
J’ai alors fermé N++ puis relancé N++. Aucun souci, l’onglet toto.txt était bien présent, avec l’encodage OEM 863 et les caractères accentués corrects !
-
Puis j’ai eu l’idée de fermer uniquement le fichier toto.txt. Dans ce cas, SANS sortir de N++, si tu ré-ouvres le fichier toto.txt, situé dans le menu Fichier => Bingo, cette fois, j’obtiens exactement le même résultat erroné que toi :-((
Mais, si tu choisis, à nouveau l’encodage OEM 863, tout est, à nouveau,correct. Et, tant que l’onglet toto.txt reste ouvert, tu peux fermer et ré-ouvrir Notepad++ sans problème : l’encodage est bien sauvegardé :-))
-
For info, I usually have the option Preferences > Backup > Remember Current seesion for next lauch ticked and numerous files are most of the time, opened in my current N++ v7.5.6 session
-
So, I first changed the parameter for New documents, from
UTF-8
toOEM 863
-
I created a new file, and typed, exactly, the same characters as Jean-Pierre and saved it as toto.txt
-
After closing and restarting N++, the Toto.txt text was still present with encoding
OEM 863
and the correct accentuated characters !
Then I decided to close the Toto.txt tab only, without closing N++. In that case, clicking on this file, present in the file history, it is opened with the ANSI encoding ( Actually the Windows-1252 encoding for French people ! ) and, of course, the characters seems corrupted !
But, if you choose, again, the
OEM-863
encoding, everything goes fine, again. And you can stop and re-start N++, without any problem, as long as the Toto.txt tab is opened when you decide to exit N++:-))Cheers,
guy038
P.S. :
Jean-Pierre, tu pourrais, aussi, utiliser l’encodage
OEM-850
. Jettes un oeil à ces deux liens :https://en.wikipedia.org/wiki/Code_page_863
https://en.wikipedia.org/wiki/Code_page_850
Il me semble, par exemple, que, si tu ouvres une console DOS ( cmd ), l’encodage par défaut, est
OEM 850
, on French configurationsTapes l’ordre
chcp
suivi de Entrée pour vérification etchcp 863
si tu as besoin de cet encodage, sous DOS -
-
Hi Guy,
thank you for your help - I agree with Jean-Pierre and all the others who
want to have a way to “force” an encoding/codepage - would be really helpful sometimes.@Jean-Pierre
I guess I found a way to let a macro do the clickings but still not really fully automated.
Put this into shortcut.xml and restart npp,<Macro name="SetOEM863" Ctrl="no" Alt="no" Shift="no" Key="0"> <Action type="2" message="0" wParam="45056" lParam="0" sParam="" /> </Macro>
then you should have an additional entry in Macro menu called SetOEM863.
Here you can assign a shortcut to that Macro which, maybe makes the life a little bit easier.No, I’m not really a notepad++ developer, did some minor pull request but
I’m still learning c++.Unfortunately since, 7.5 it is normal that you don’t have the plugin manager bundled.
See here on how to get it back.I agree C is nice but I felt in love with python :-)
Nice cicade, somehow it looks like une broche (???) :-D
Cheers
Claudia -
Hello Claudia, Hello Guy038,
Thank you both for trying to help me.
To Guy,
Personally, I unchecked the “memorization of the current session”. I can open several files, but when I go out, I want to be sure that all my files are saved. This seems to me, of course, cleaner and simpler.
I understand very well that, in a session, the setting is preserved.When I open a console, I run an “lp.bat” to be positioned in the correct directory. In this “.bat”, I just coded “chcp 863” so that the accents are displayed when I run a program. Unfortunately, when I debbug, “gdb” does not resituate the accented characters that I have in my program. But that does not matter, it’s in debbug ! …
Your French is impeccable.
To Claudia,
I already have a macro “lp” which switches the edition in OEM-863. I created it with the macro option.
I have another “accents” that converts all the accented characters when I edit an old file. For that one, it was a little more laborious.A very personal note as an aside :
I practiced a lot of languages in my career as a computer system engineer, for the most recent (!!! … C => 1979), PHP that i like well to use, it is very near of the C langage, C++ (Eurocopter), Python (FreeCad) , Java (Android phone), a little Perl a long time ago but, I consider, only from my point of view, that they are ersatz of the old C language who has the lowest expension rate. We are permanently talking about object-oriented programming but we forget that we live in an object-oriented system since the Big Bang, that is to say for 13 milliard years and we never talk about object-oriented execution. This is not a language, only a turn of mind.
I write about this in my site “http://jeanpierre.rousset.free.fr/Informatique/Noyau_Graphique/index.html” to show an interesting recursive way to use the console in applications that can be interactive. But,… written in french !.., sorry !..Best Regards
Jean-Pierre -
Hello, @Jean-Pierre-Rousset,
Tu as dis :
Your French is impeccable.
Tu plaisantes, je suppose ? J’espère bien car je suis un pur Français, vivant à Grenoble, pas très loin de la Provence !!!
You said :
Your French is impeccable.
You’re joking, aren’t you ? Quite pleased to hear this, because French is my mother language and I’m living in Grenoble, not very far from Provence ;-))
Cheers
guy038
-
Bonsoir Guy,
Le plus beau, c’est que je ne plaisantais pas. Je suis profondément désolé. Je n’avais pas regardé votre profil tant je croyais sincèrement que vous étiez anglais ou américain. J’avoue que j’avais tout de même un peu tilté sur le français.
Toutes mes plus plates excuses !.. Pas fâché j’espère ?
Next time I will be careful !..
I’m situated in Vitrolles en Provence.Cordialement.
Jean-Pierre -
@Claudia-Frank said:
<Macro name="SetOEM863" Ctrl="no" Alt="no" Shift="no" Key="0"> <Action type="2" message="0" wParam="45056" lParam="0" sParam="" /> </Macro>
Good evening Claudia,
I wrote: "I already have a macro “lp” which switches the edition in OEM-863. I created it with the macro option. ". This macro works in another context since it contains a backup of the file. Well NPP does not consider switching to OEM863 as a file’s modification. So, it is not good.
So it is rather your proposal that is much better because it only performs the switch to the encoding OEM-863.
Thank you very much so, … adopted! …
Cheers (I did not know this expression in this actual context ! …)
Jean Pierre -
Jean-Pierre
Cheers (I did not know this expression in this actual context ! …)
me too until, I was working with an Irish man as he always shouted CHEERS,
regardless if it was in the morning when he arrived in the bureau or when a went home.
I loved it - especially with the accent he had - I always had to smile. So I adopted it.CHEERS
ClaudiaBtw. if you want to have this more automated we still can go one step further but
this would mean you have to install the python script plugin. -
Good evening Claudia,
@ Claudia-Frank said:
Btw. if you want to have this more This would mean you have to install the python script plugin.
I thank you for your proposal but I think I’ll leave it there without trying to give you extra work.
I read in the documentation, I don’t know nomore where, the Plugins Manager was removed by the developper (or the team to developper) and he was writing one without publicity. I will wait. Your macro is enough for me now.I’m of course a little surprised by the technical choices to manage macros but I see this through my experience as a developer at the Eurocopter helicopters manufacturing in Marignane where I wrote in the 1975s under a SEL 85 computer (System Engeniering Laboratories acquired by Gould) a text editor that reproduced exactly the main features of IBM’s “XEDIT” editor running under VM/CMS to simplify the work of users.
In this editor, I had of course imited the macros written in “REXX” IBM proprietary language. The macro “profile xedit” was automatically executed before any editing to do what I would have liked it to be done with notepad++. Maybe I have my mind a bit distorted by my basic IBM training ! …
Anyway, I thank you very much again for your help. Perhaps for a next time ! …
Cordialy and best regardsJean-Pierre
-
Wow! @Claudia-Frank has done so many great things here and elsewhere in support of Notepad++…but I don’t think her good deeds have ever inspired artwork postings before! Nice!
-
Hi, @jean-pierre-rousset,
Oui, ces magnifiques images vous donnent vraiment l’impression de “sentir” la Provence et l’envie furieuse de s’y rendre !!
Yes, these beautiful pictures really give you the impression of “feeling” Provence and the urge to go there !!
Cheers,
guy038
-
Hello Jean-Pierre,
thank you for your kind words and those wonderful images, really appreciated.
Now I know that I’m ready for holidays, unfortunate - I have to stay another 2 month
at work. Dreaming …:-)
Cheers
Claudia -
@guy038 said:
…
Yes, these beautiful pictures really give you the impression of “feeling” Provence and the urge to go there !!
…Hi guy038,
J’aime bien communiquer comme cela. Cela me paraît plus sympa. D’habitude, ça fait trop sérieux et un peu plat.
Je ne suis pas provençal de souche mais ayant résidé à Marignane et à Vitrolles en Provence — car il y a un Vitrolles en Lubéron — depuis 1959, je me suis toujours considéré en vacances même quand je travaillais.
Mais il y a plus beau et plus attrayant que Vitrolles, vers les Alpes par exemple.I well like to exchange like that. It seems to me more fun. Usually, it’s too serious and a little flat.
I’m not a provençal strain/origin (?) but having resided in Marignane and Vitrolles in Provence — because there is a Vitrolles in Lubéron — since 1959, I always considered i was in vacation even when I worked.
But there are places more beautiful and more attractive than Vitrolles, towards the Alps for example.Cheers (puisque j’ai appris cette expression ici !..)
Jean-Pierre
-
…
thank you for your kind words and those wonderful images, really appreciated.
Now I know that I’m ready for holidays, unfortunate - I have to stay another 2 month
at work. Dreaming …
…Good evening Claudia,
Why not France as a destination! … Auvergne, Bretagne, Jura; Alsace, Aquitaine, the Alps …
Still a little patience so, 2 months, it’s not too long! …
Cheers
Jean Pierre