jEdit Community - Resources for users of the jEdit Text Editor
html named entities (html_named_entities.bsh v1.5 by Johannes Raggam)
Submitted by thet on Thursday, 29 June, 2006 - 16:35
converts special characters to html entities.
based on recorded macro (search/replace) and entity list from http://de.selfhtml.org/html/referenz/zeichen.htm
keeps the search settings as is.

the JTidy plugin has also this function, but maybe this beanshell macro is still useful for someone.

## NEW VERSION ##
including ISO-8851-2 charset
may also be faster
the CHARSET of the macro is UTF-8,
set your file temporary (or permanent) to UTF-8, otherwise the search will nothing find to replace.
edit the macro to fit your needs - for sure there are many characters from many charsets left.

### PLEASE NOTE ###
the file is in UTF-8 encoding. your file where you want to replace characters also has to be in utf-8, otherwise there will be no effect! so: CONVERT YOUR FILE IN UTF-8 BEFORE running the macro and convert it back afterwards.
if someone knows a beanshell commands to read and set the charset-encoding of an file, let me know - so this task could be automated. --> raggam at adm dot at
### / PLEASE NOTE ###

Updated on 02/26/2007 - 20:39
Downloads: 1666

Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
seems not work at windows xp with jedit 4.2
by tomasio on Fri, 14/07/2006 - 11:30
Kopied the .bsh-file into the "makros"-Folder of the program only to find out running it had no effect Sad
--
kind regards,
tomasio
"describing an issue reveals the way to solve it"
 
encoding
by thet on Mon, 26/02/2007 - 20:27
its the charset encoding, i guess.
the macro is stored in utf-8, but many files are in iso-8859-1 and others. wether copy-rename, convert and save the macro itself to the charset you want or convert the file you run your macro on. try it, i think that will work (jedit, load a file. menu utilities -> buffer options -> character encoding )

or i find a way how to get and set the charset of the whole search&replace action.
 
...
by thet on Mon, 26/02/2007 - 20:28
sorry for the late answer
User login
Browse archives
« November 2024  
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   100936
Context Free Art (*.cfdg)   0.31   46062
BBEdit scheme   1.0   18601
JBuilder scheme   .001   18502
ColdFusion scheme   1.0   18031
R Edit Mode - extensive version   0.1   17481
Advanced HTML edit mode   1.0   16213
Matlab Edit Mode   1.0   16075
jEdit XP icons   1.0   15236
XP icons for jEdit   1.1   14300