diff --git a/miglayout.spec b/miglayout.spec index 5ab9ba3..80e9ed8 100644 --- a/miglayout.spec +++ b/miglayout.spec @@ -41,23 +41,21 @@ This package contains examples and demos code for MiGLayout. # Fix line endings in some demo and example source files. dos2unix net/miginfocom/demo/{CallbackDemo,SwingDemo,SwtDemo}.java dos2unix net/miginfocom/examples/{Example01,Example,ExampleGood}.java -# Fix Windows codepage 1251 quotes in SwtDemo.java. Note that Java source -# code is supposed to be in Unicode, *NOT* in codepage 1251, even on -# Windows! +# Convert Windows codepage 1251 quotes in SwtDemo.java to UTF-8. iconv --from=windows-1251 --to=UTF-8 net/miginfocom/demo/SwtDemo.java >net/miginfocom/demo/SwtDemo.java.new touch -r net/miginfocom/demo/SwtDemo.java{,.new} mv net/miginfocom/demo/SwtDemo.java{.new,} %build export CLASSPATH=%{_libdir}/java/swt.jar:. -javac net/miginfocom/{layout,swing,swt}/*.java +javac -encoding utf8 net/miginfocom/{layout,swing,swt}/*.java # We'll build the demos and examples just to ensure that they compile, # but we're not going to package the binaries. # We can't build demo/HiDPISimulator.java due to a missing prerequisite # (org.jvnet.substance). -javac net/miginfocom/demo/[CS]*.java -javac net/miginfocom/examples/*.java +javac -encoding utf8 net/miginfocom/demo/[CS]*.java +javac -encoding utf8 net/miginfocom/examples/*.java jar cmf META-INF/MANIFEST.MF \ %{name}-%{version}.jar \