Skip to content

Commit f169c52

Browse files
committed
Merge pull request #38 from ruytakata/master
Fix for bug #919: Accents don't export to RTF and for bug #1270: Cleanup entries error 3
2 parents a18d679 + d60322e commit f169c52

File tree

3 files changed

+46
-70
lines changed

3 files changed

+46
-70
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
[master]
2+
- Fix for bug #1270: Cleanup entries error 3
3+
- Fix for bug #919: Accents don't export to RTF (by ruy.takata)
24
- Change the CrossRef content negotiation for bibtex DOI import (by sheffien)
35
- Fix for bug #1253: Cleanup entries error 2 (by ruy.takata)
46
- Fix for bug 1213 (sourceforge): Fix encoding for DOI import

src/main/java/net/sf/jabref/Globals.java

Lines changed: 38 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (C) 2003-2012 JabRef contributors.
1+
/* Copyright (C) 2003-2015 JabRef contributors.
22
This program is free software; you can redistribute it and/or modify
33
it under the terms of the GNU General Public License as published by
44
the Free Software Foundation; either version 2 of the License, or
@@ -1184,103 +1184,75 @@ public static int getShortcutMask() {
11841184
// Use UNICODE characters for RTF-Chars which can not be found in the
11851185
// standard codepage
11861186

1187-
// RTFCHARS.put("`A", "\\u192"); // "Agrave" exists in standard
1188-
// codepage
1187+
RTFCHARS.put("`A", "\\u192A"); // "Agrave"
11891188
RTFCHARS.put("'A", "\\u193A"); // "Aacute"
1190-
// RTFCHARS.put("^A", "\\u194"); // "Acirc" exists in standard
1191-
// codepage
1189+
RTFCHARS.put("^A", "\\u194A"); // "Acirc"
11921190
RTFCHARS.put("~A", "\\u195A"); // "Atilde"
1193-
// RTFCHARS.put("\"A", "\\u196"); // "Auml" exists in standard
1194-
// codepage
1191+
RTFCHARS.put("\"A", "\\u196A"); // "Auml"
11951192
RTFCHARS.put("AA", "\\u197A"); // "Aring"
1196-
RTFCHARS.put("AE", "{\\uc2\\u198AE}"); // "AElig"
1193+
// RTFCHARS.put("AE", "{\\uc2\\u198AE}"); // "AElig"
1194+
RTFCHARS.put("AE", "{\\u198A}"); // "AElig"
11971195
RTFCHARS.put("cC", "\\u199C"); // "Ccedil"
1198-
// RTFCHARS.put("`E", "\\u200"); // "Egrave" exists in standard
1199-
// codepage
1196+
RTFCHARS.put("`E", "\\u200E"); // "Egrave"
12001197
RTFCHARS.put("'E", "\\u201E"); // "Eacute"
1201-
// RTFCHARS.put("^E", "\\u202"); // "Ecirc" exists in standard
1202-
// codepage
1203-
// RTFCHARS.put("\"E", "\\u203"); // "Euml" exists in standard
1204-
// codepage
1205-
// RTFCHARS.put("`I", "\\u204"); // "Igrave" exists in standard
1206-
// codepage
1198+
RTFCHARS.put("^E", "\\u202E"); // "Ecirc"
1199+
RTFCHARS.put("\"E", "\\u203E"); // "Euml"
1200+
RTFCHARS.put("`I", "\\u204I"); // "Igrave
12071201
RTFCHARS.put("'I", "\\u205I"); // "Iacute"
1208-
// RTFCHARS.put("^I", "\\u206"); // "Icirc" exists in standard
1209-
// codepage
1210-
// RTFCHARS.put("\"I", "\\u207"); // "Iuml" exists in standard
1211-
// codepage
1202+
RTFCHARS.put("^I", "\\u206I"); // "Icirc"
1203+
RTFCHARS.put("\"I", "\\u207I"); // "Iuml"
12121204
RTFCHARS.put("DH", "\\u208D"); // "ETH"
12131205
RTFCHARS.put("~N", "\\u209N"); // "Ntilde"
1214-
// RTFCHARS.put("`O", "\\u210"); // "Ograve" exists in standard
1215-
// codepage
1206+
RTFCHARS.put("`O", "\\u210O"); // "Ograve"
12161207
RTFCHARS.put("'O", "\\u211O"); // "Oacute"
1217-
// RTFCHARS.put("^O", "\\u212"); // "Ocirc" exists in standard
1218-
// codepage
1208+
RTFCHARS.put("^O", "\\u212O"); // "Ocirc"
12191209
RTFCHARS.put("~O", "\\u213O"); // "Otilde"
1220-
// RTFCHARS.put("\"O", "\\u214"); // "Ouml" exists in standard
1221-
// codepage
1210+
RTFCHARS.put("\"O", "\\u214O"); // "Ouml"
12221211
// According to ISO 8859-1 the "\times" symbol should be placed here
12231212
// (#215).
12241213
// Omitting this, because it is a mathematical symbol.
1225-
//RTFCHARS.put("O", "\\u216O"); // "Oslash"
1226-
RTFCHARS.put("O", "\\'d8");
1214+
RTFCHARS.put("O", "\\u216O"); // "Oslash"
1215+
// RTFCHARS.put("O", "\\'d8");
12271216
RTFCHARS.put("o", "\\'f8");
1228-
// RTFCHARS.put("`U", "\\u217"); // "Ugrave" exists in standard
1229-
// codepage
1217+
RTFCHARS.put("`U", "\\u217U"); // "Ugrave"
12301218
RTFCHARS.put("'U", "\\u218U"); // "Uacute"
1231-
// RTFCHARS.put("^U", "\\u219"); // "Ucirc" exists in standard
1232-
// codepage
1233-
// RTFCHARS.put("\"U", "\\u220"); // "Uuml" exists in standard
1234-
// codepage
1219+
RTFCHARS.put("^U", "\\u219U"); // "Ucirc"
1220+
RTFCHARS.put("\"U", "\\u220U"); // "Uuml"
12351221
RTFCHARS.put("'Y", "\\u221Y"); // "Yacute"
12361222
RTFCHARS.put("TH", "{\\uc2\\u222TH}"); // "THORN"
12371223
RTFCHARS.put("ss", "{\\uc2\\u223ss}"); // "szlig"
12381224
//RTFCHARS.put("ss", "AFFEN"); // "szlig"
1239-
// RTFCHARS.put("`a", "\\u224"); // "agrave" exists in standard
1240-
// codepage
1225+
RTFCHARS.put("`a", "\\u224a"); // "agrave"
12411226
RTFCHARS.put("'a", "\\u225a"); // "aacute"
1242-
// RTFCHARS.put("^a", "\\u226"); // "acirc" exists in standard
1243-
// codepage
1227+
RTFCHARS.put("^a", "\\u226a"); // "acirc"
12441228
RTFCHARS.put("~a", "\\u227a"); // "atilde"
1245-
// RTFCHARS.put("\"a", "\\u228"); // "auml" exists in standard
1246-
// codepage
1229+
RTFCHARS.put("\"a", "\\u228a"); // "auml"
12471230
RTFCHARS.put("aa", "\\u229a"); // "aring"
1248-
RTFCHARS.put("ae", "{\\uc2\\u230ae}"); // "aelig"
1231+
// RTFCHARS.put("ae", "{\\uc2\\u230ae}"); // "aelig" \\u230e6
1232+
RTFCHARS.put("ae", "{\\u230a}"); // "aelig" \\u230e6
12491233
RTFCHARS.put("cc", "\\u231c"); // "ccedil"
1250-
// RTFCHARS.put("`e", "\\u232"); // "egrave" exists in standard
1251-
// codepage
1234+
RTFCHARS.put("`e", "\\u232e"); // "egrave"
12521235
RTFCHARS.put("'e", "\\u233e"); // "eacute"
1253-
// RTFCHARS.put("^e", "\\u234"); // "ecirc" exists in standard
1254-
// codepage
1255-
// RTFCHARS.put("\"e", "\\u235"); // "euml" exists in standard
1256-
// codepage
1257-
// RTFCHARS.put("`i", "\\u236"); // "igrave" exists in standard
1258-
// codepage
1236+
RTFCHARS.put("^e", "\\u234e"); // "ecirc"
1237+
RTFCHARS.put("\"e", "\\u235e"); // "euml"
1238+
RTFCHARS.put("`i", "\\u236i"); // "igrave"
12591239
RTFCHARS.put("'i", "\\u237i"); // "iacute"
1260-
// RTFCHARS.put("^i", "\\u238"); // "icirc" exists in standard
1261-
// codepage
1262-
// RTFCHARS.put("\"i", "\\u239"); // "iuml" exists in standard
1263-
// codepage
1240+
RTFCHARS.put("^i", "\\u238i"); // "icirc"
1241+
RTFCHARS.put("\"i", "\\u239i"); // "iuml"
12641242
RTFCHARS.put("dh", "\\u240d"); // "eth"
1265-
// RTFCHARS.put("~n", "\\u241"); // "ntilde" exists in standard
1266-
// codepage
1267-
// RTFCHARS.put("`o", "\\u242"); // "ograve" exists in standard
1268-
// codepage
1243+
RTFCHARS.put("~n", "\\u241n"); // "ntilde"
1244+
RTFCHARS.put("`o", "\\u242o"); // "ograve"
12691245
RTFCHARS.put("'o", "\\u243o"); // "oacute"
1270-
// RTFCHARS.put("^o", "\\u244"); // "ocirc" exists in standard
1271-
// codepage
1246+
RTFCHARS.put("^o", "\\u244o"); // "ocirc"
12721247
RTFCHARS.put("~o", "\\u245o"); // "otilde"
1273-
// RTFCHARS.put("\"o", "\\u246"); // "ouml" exists in standard
1274-
// codepage
1248+
RTFCHARS.put("\"o", "\\u246o"); // "ouml"
12751249
// According to ISO 8859-1 the "\div" symbol should be placed here
12761250
// (#247).
12771251
// Omitting this, because it is a mathematical symbol.
1278-
//RTFCHARS.put("o", "\\u248o"); // "oslash"
1279-
// RTFCHARS.put("`u", "\\u249"); // "ugrave" exists in standard
1280-
// codepage
1252+
RTFCHARS.put("o", "\\u248o"); // "oslash"
1253+
RTFCHARS.put("`u", "\\u249u"); // "ugrave"
12811254
RTFCHARS.put("'u", "\\u250u"); // "uacute"
1282-
// RTFCHARS.put("^u", "\\u251"); // "ucirc" exists in standard
1283-
// codepage
1255+
RTFCHARS.put("^u", "\\u251u"); // "ucirc"
12841256
// RTFCHARS.put("\"u", "\\u252"); // "uuml" exists in standard
12851257
// codepage
12861258
RTFCHARS.put("'y", "\\u253y"); // "yacute"

src/main/java/net/sf/jabref/imports/HTMLConverter.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,13 @@ public class HTMLConverter implements LayoutFormatter {
188188
// U+00EA ISOlat1
189189
{"235", "euml", "\\{\\\\\"\\{e\\}\\}"}, // latin small letter e with diaeresis,
190190
// U+00EB ISOlat1
191-
{"236", "igrave", "\\{\\\\`\\{\\\\i\\}\\}"}, // latin small letter i with grave,
191+
{"236", "igrave", "\\{\\\\`\\{i\\}\\}"}, // latin small letter i with grave,
192192
// U+00EC ISOlat1
193-
{"237", "iacute", "\\{\\\\'\\{\\\\i\\}\\}"}, // latin small letter i with acute,
193+
{"237", "iacute", "\\{\\\\'\\{i\\}\\}"}, // latin small letter i with acute,
194194
// U+00ED ISOlat1
195-
{"238", "icirc", "\\{\\\\\\^\\{\\\\i\\}\\}"}, // latin small letter i with circumflex,
195+
{"238", "icirc", "\\{\\\\\\^\\{i\\}\\}"}, // latin small letter i with circumflex,
196196
// U+00EE ISOlat1
197-
{"239", "iuml", "\\{\\\\\"\\{\\\\i\\}\\}"}, // latin small letter i with diaeresis,
197+
{"239", "iuml", "\\{\\\\\"\\{i\\}\\}"}, // latin small letter i with diaeresis,
198198
// U+00EF ISOlat1
199199
{"240", "eth", "\\{\\\\dh\\}"}, // latin small letter eth, U+00F0 ISOlat1
200200
{"241", "ntilde", "\\{\\\\~\\{n\\}\\}"}, // latin small letter n with tilde,
@@ -227,6 +227,8 @@ public class HTMLConverter implements LayoutFormatter {
227227
// U+00FE ISOlat1
228228
{"255", "yuml", "\\{\\\\\"\\{y\\}\\}"}, // latin small letter y with diaeresis,
229229
// U+00FF ISOlat1
230+
{"332", "Omacro", "\\{\\\\=\\{O\\}\\}"}, // the small letter o with macron
231+
{"333", "omacro", "\\{\\\\=\\{o\\}\\}"}, // the big letter O with macron
230232
{"402", "fnof", "\\$f\\$"}, // latin small f with hook = function
231233
// = florin, U+0192 ISOtech
232234

0 commit comments

Comments
 (0)