Skip to content

Commit

Permalink
. not /, and use a class in the right package
Browse files Browse the repository at this point in the history
  • Loading branch information
eggrobin committed Dec 11, 2024
1 parent 20b01bf commit f10cc94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static void main(String[] args) throws IOException {
final File f2 = new File("org/unicode/text/UCD/");
System.out.println(f2.getAbsolutePath());
TransliteratorUtilities.registerTransliteratorFromFile(
UseTransliterator.class.getResource("/").getPath(), "any-temp");
UseTransliterator.class.getResource(".").getPath(), "any-temp");
final Transliterator t = Transliterator.getInstance("any-temp");
final File f = new File(filename);
final String fileContents =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.io.IOException;
import java.io.PrintWriter;
import org.unicode.text.UCD.Default;
import org.unicode.text.UCD.MakeUnicodeFiles;
import org.unicode.text.utility.Utility.RuntimeIOException;

public class UnicodeDataFile {
Expand Down Expand Up @@ -70,7 +71,10 @@ private UnicodeDataFile(String directory, String filename, boolean isHTML) throw
}
try {
Utility.appendFile(
getClass().getResource("/").getPath() + filename + "Header" + fileType,
MakeUnicodeFiles.class.getResource(".").getPath()
+ filename
+ "Header"
+ fileType,
Utility.UTF8_UNIX,
out);
} catch (final RuntimeIOException e) {
Expand Down

0 comments on commit f10cc94

Please sign in to comment.