Subject: [PATCH] Add Apple NLS

HFS has support for NLS. However the relevant NLS tables are missing.
Here are they automatically transformed from the tables at unicode.org.
Codepages requiring special handling like CJK, RTL or Brahmic ones aren't
included in this patch.

Signed-off-by: Vladimir Serbinenko <[email protected]>

Patch itself is at http://download-mirror.savannah.gnu.org/releases/grub/phcoder/nls.diff due to its size (309K)



Attachments:
signature.asc (294.00 B)
OpenPGP digital signature

2012-05-17 22:47:13

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH] Add Apple NLS

On Sun, 13 May 2012 15:59:00 +0200
Vladimir '__-coder/phcoder' Serbinenko <[email protected]> wrote:

> HFS has support for NLS. However the relevant NLS tables are missing.
> Here are they automatically transformed from the tables at unicode.org.
> Codepages requiring special handling like CJK, RTL or Brahmic ones aren't
> included in this patch.
>
> Signed-off-by: Vladimir Serbinenko <[email protected]>
>
> Patch itself is at http://download-mirror.savannah.gnu.org/releases/grub/phcoder/nls.diff due to its size (309K)
>

Thanks, this looks useful.

fs/nls/Kconfig | 157 +++++++++
fs/nls/Makefile | 23 +
fs/nls/nls_macceltic.c | 566 ++++++++++++++++++++++++++++++++++
fs/nls/nls_maccenteuro.c | 496 ++++++++++++++++++++++++++++++
fs/nls/nls_maccroatian.c | 566 ++++++++++++++++++++++++++++++++++
fs/nls/nls_maccyrillic.c | 461 ++++++++++++++++++++++++++++
fs/nls/nls_macgaelic.c | 531 ++++++++++++++++++++++++++++++++
fs/nls/nls_macgreek.c | 461 ++++++++++++++++++++++++++++
fs/nls/nls_maciceland.c | 566 ++++++++++++++++++++++++++++++++++
fs/nls/nls_macinuit.c | 496 ++++++++++++++++++++++++++++++
fs/nls/nls_macroman.c | 601 +++++++++++++++++++++++++++++++++++++
fs/nls/nls_macromanian.c | 566 ++++++++++++++++++++++++++++++++++
fs/nls/nls_macturkish.c | 566 ++++++++++++++++++++++++++++++++++
13 files changed, 6055 insertions(+), 1 deletion(-)

http://unicode.org/copyright.html#Exhibit1 discusses our ability to use
unicode.org data:

(a) the above copyright notice(s) and this permission notice appear
with all copies of the Data Files or Software,

(b) both the above copyright notice(s) and this permission notice
appear in associated documentation, and

(c) there is clear notice in each modified Data File or in the
Software as well as in the documentation associated with the Data
File(s) or Software that the data or software has been modified.

>From my reading, your patch does not comply with provision (a), so I
modified it as below.


Also, I note that the unicode files have

MODULE_LICENSE("Dual BSD/GPL");

Where did this come from? Is this a thing you decided upon or is it
unicode.org's license requirement?




From: Andrew Morton <[email protected]>
Subject: fs-nls-add-apple-nls-fix

add unicode.org copyright and permission notices

Cc: Al Viro <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Clemens Ladisch <[email protected]>
Cc: OGAWA Hirofumi <[email protected]>
Cc: Vladimir Serbinenko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

fs/nls/nls_macceltic.c | 36 ++++++++++++++++++++++++++++++++++++
fs/nls/nls_maccenteuro.c | 36 ++++++++++++++++++++++++++++++++++++
fs/nls/nls_maccroatian.c | 36 ++++++++++++++++++++++++++++++++++++
fs/nls/nls_maccyrillic.c | 36 ++++++++++++++++++++++++++++++++++++
fs/nls/nls_macgaelic.c | 36 ++++++++++++++++++++++++++++++++++++
fs/nls/nls_macgreek.c | 36 ++++++++++++++++++++++++++++++++++++
fs/nls/nls_maciceland.c | 36 ++++++++++++++++++++++++++++++++++++
fs/nls/nls_macinuit.c | 36 ++++++++++++++++++++++++++++++++++++
fs/nls/nls_macroman.c | 36 ++++++++++++++++++++++++++++++++++++
fs/nls/nls_macromanian.c | 36 ++++++++++++++++++++++++++++++++++++
fs/nls/nls_macturkish.c | 36 ++++++++++++++++++++++++++++++++++++
11 files changed, 396 insertions(+)

diff -puN fs/nls/Kconfig~fs-nls-add-apple-nls-fix fs/nls/Kconfig
diff -puN fs/nls/Makefile~fs-nls-add-apple-nls-fix fs/nls/Makefile
diff -puN fs/nls/nls_macceltic.c~fs-nls-add-apple-nls-fix fs/nls/nls_macceltic.c
--- a/fs/nls/nls_macceltic.c~fs-nls-add-apple-nls-fix
+++ a/fs/nls/nls_macceltic.c
@@ -7,6 +7,42 @@
* The Unicode to charset table has only exact mappings.
*/

+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do
+ * so, provided that (a) the above copyright notice(s) and this permission
+ * notice appear with all copies of the Data Files or Software, (b) both the
+ * above copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
+ * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+ * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written
+ * authorization of the copyright holder.
+ */
+
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
diff -puN fs/nls/nls_maccenteuro.c~fs-nls-add-apple-nls-fix fs/nls/nls_maccenteuro.c
--- a/fs/nls/nls_maccenteuro.c~fs-nls-add-apple-nls-fix
+++ a/fs/nls/nls_maccenteuro.c
@@ -7,6 +7,42 @@
* The Unicode to charset table has only exact mappings.
*/

+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do
+ * so, provided that (a) the above copyright notice(s) and this permission
+ * notice appear with all copies of the Data Files or Software, (b) both the
+ * above copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
+ * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+ * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written
+ * authorization of the copyright holder.
+ */
+
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
diff -puN fs/nls/nls_maccroatian.c~fs-nls-add-apple-nls-fix fs/nls/nls_maccroatian.c
--- a/fs/nls/nls_maccroatian.c~fs-nls-add-apple-nls-fix
+++ a/fs/nls/nls_maccroatian.c
@@ -7,6 +7,42 @@
* The Unicode to charset table has only exact mappings.
*/

+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do
+ * so, provided that (a) the above copyright notice(s) and this permission
+ * notice appear with all copies of the Data Files or Software, (b) both the
+ * above copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
+ * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+ * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written
+ * authorization of the copyright holder.
+ */
+
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
diff -puN fs/nls/nls_maccyrillic.c~fs-nls-add-apple-nls-fix fs/nls/nls_maccyrillic.c
--- a/fs/nls/nls_maccyrillic.c~fs-nls-add-apple-nls-fix
+++ a/fs/nls/nls_maccyrillic.c
@@ -7,6 +7,42 @@
* The Unicode to charset table has only exact mappings.
*/

+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do
+ * so, provided that (a) the above copyright notice(s) and this permission
+ * notice appear with all copies of the Data Files or Software, (b) both the
+ * above copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
+ * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+ * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written
+ * authorization of the copyright holder.
+ */
+
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
diff -puN fs/nls/nls_macgaelic.c~fs-nls-add-apple-nls-fix fs/nls/nls_macgaelic.c
--- a/fs/nls/nls_macgaelic.c~fs-nls-add-apple-nls-fix
+++ a/fs/nls/nls_macgaelic.c
@@ -7,6 +7,42 @@
* The Unicode to charset table has only exact mappings.
*/

+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do
+ * so, provided that (a) the above copyright notice(s) and this permission
+ * notice appear with all copies of the Data Files or Software, (b) both the
+ * above copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
+ * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+ * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written
+ * authorization of the copyright holder.
+ */
+
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
diff -puN fs/nls/nls_macgreek.c~fs-nls-add-apple-nls-fix fs/nls/nls_macgreek.c
--- a/fs/nls/nls_macgreek.c~fs-nls-add-apple-nls-fix
+++ a/fs/nls/nls_macgreek.c
@@ -7,6 +7,42 @@
* The Unicode to charset table has only exact mappings.
*/

+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do
+ * so, provided that (a) the above copyright notice(s) and this permission
+ * notice appear with all copies of the Data Files or Software, (b) both the
+ * above copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
+ * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+ * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written
+ * authorization of the copyright holder.
+ */
+
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
diff -puN fs/nls/nls_maciceland.c~fs-nls-add-apple-nls-fix fs/nls/nls_maciceland.c
--- a/fs/nls/nls_maciceland.c~fs-nls-add-apple-nls-fix
+++ a/fs/nls/nls_maciceland.c
@@ -7,6 +7,42 @@
* The Unicode to charset table has only exact mappings.
*/

+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do
+ * so, provided that (a) the above copyright notice(s) and this permission
+ * notice appear with all copies of the Data Files or Software, (b) both the
+ * above copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
+ * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+ * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written
+ * authorization of the copyright holder.
+ */
+
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
diff -puN fs/nls/nls_macinuit.c~fs-nls-add-apple-nls-fix fs/nls/nls_macinuit.c
--- a/fs/nls/nls_macinuit.c~fs-nls-add-apple-nls-fix
+++ a/fs/nls/nls_macinuit.c
@@ -7,6 +7,42 @@
* The Unicode to charset table has only exact mappings.
*/

+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do
+ * so, provided that (a) the above copyright notice(s) and this permission
+ * notice appear with all copies of the Data Files or Software, (b) both the
+ * above copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
+ * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+ * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written
+ * authorization of the copyright holder.
+ */
+
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
diff -puN fs/nls/nls_macroman.c~fs-nls-add-apple-nls-fix fs/nls/nls_macroman.c
--- a/fs/nls/nls_macroman.c~fs-nls-add-apple-nls-fix
+++ a/fs/nls/nls_macroman.c
@@ -7,6 +7,42 @@
* The Unicode to charset table has only exact mappings.
*/

+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do
+ * so, provided that (a) the above copyright notice(s) and this permission
+ * notice appear with all copies of the Data Files or Software, (b) both the
+ * above copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
+ * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+ * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written
+ * authorization of the copyright holder.
+ */
+
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
diff -puN fs/nls/nls_macromanian.c~fs-nls-add-apple-nls-fix fs/nls/nls_macromanian.c
--- a/fs/nls/nls_macromanian.c~fs-nls-add-apple-nls-fix
+++ a/fs/nls/nls_macromanian.c
@@ -7,6 +7,42 @@
* The Unicode to charset table has only exact mappings.
*/

+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do
+ * so, provided that (a) the above copyright notice(s) and this permission
+ * notice appear with all copies of the Data Files or Software, (b) both the
+ * above copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
+ * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+ * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written
+ * authorization of the copyright holder.
+ */
+
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
diff -puN fs/nls/nls_macturkish.c~fs-nls-add-apple-nls-fix fs/nls/nls_macturkish.c
--- a/fs/nls/nls_macturkish.c~fs-nls-add-apple-nls-fix
+++ a/fs/nls/nls_macturkish.c
@@ -7,6 +7,42 @@
* The Unicode to charset table has only exact mappings.
*/

+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright 1991-2012 Unicode, Inc. All rights reserved. Distributed under
+ * the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of the Unicode data files and any associated documentation (the "Data
+ * Files") or Unicode software and any associated documentation (the
+ * "Software") to deal in the Data Files or Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, and/or sell copies of the Data Files or Software, and
+ * to permit persons to whom the Data Files or Software are furnished to do
+ * so, provided that (a) the above copyright notice(s) and this permission
+ * notice appear with all copies of the Data Files or Software, (b) both the
+ * above copyright notice(s) and this permission notice appear in associated
+ * documentation, and (c) there is clear notice in each modified Data File or
+ * in the Software as well as in the documentation associated with the Data
+ * File(s) or Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
+ * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+ * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in these Data Files or Software without prior written
+ * authorization of the copyright holder.
+ */
+
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
_

Subject: Re: [PATCH] Add Apple NLS

> Thanks, this looks useful.

>

You're welcome. Thank you for putting it in your tree.


>
> Also, I note that the unicode files have
>
> MODULE_LICENSE("Dual BSD/GPL");
>
> Where did this come from? Is this a thing you decided upon or is it
> unicode.org's license requirement?
>

In this case I've taken the precedental approach rather than looking through
licensing files. Other NLS files have a notice that they are based on unicode.org
table, so I've supposed that the license requirements were already checked for them
and the code was reviewed and tested for a long time, so I've picked another nls_*.c
file and only replaced the actual tables using a simple python script. So actually I
don't hold any copyright on this one. All copyright goes to original nls_*.c and to
Unicode consortium.

--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


Attachments:
signature.asc (294.00 B)
OpenPGP digital signature

2012-06-01 19:36:13

by Yinghai Lu

[permalink] [raw]
Subject: Re: [PATCH] Add Apple NLS

On Thu, May 17, 2012 at 9:36 PM, Vladimir '?-coder/phcoder' Serbinenko
<[email protected]> wrote:
>> Also, I note that the unicode files have
>>
>> ? ? ? MODULE_LICENSE("Dual BSD/GPL");
>>
>> Where did this come from? ?Is this a thing you decided upon or is it
>> unicode.org's license requirement?
>>

looks like Makefile change is not right... it has hard code =m for new modules.

those line should be removed.

Thanks

Yinghai


diff --git a/fs/nls/Makefile b/fs/nls/Makefile
index f499dd7..b6b0550 100644
--- a/fs/nls/Makefile
+++ b/fs/nls/Makefile
@@ -2,6 +2,18 @@
# Makefile for native language support
#

+CONFIG_NLS_MACCELTIC=m
+CONFIG_NLS_MACCENTEURO=m
+CONFIG_NLS_MACCROATIAN=m
+CONFIG_NLS_MACCYRILLIC=m
+CONFIG_NLS_MACGAELIC=m
+CONFIG_NLS_MACGREEK=m
+CONFIG_NLS_MACICELAND=m
+CONFIG_NLS_MACINUIT=m
+CONFIG_NLS_MACROMANIAN=m
+CONFIG_NLS_MACROMAN=m
+CONFIG_NLS_MACTURKISH=m
+
obj-$(CONFIG_NLS) += nls_base.o

obj-$(CONFIG_NLS_CODEPAGE_437) += nls_cp437.o

2012-06-01 21:57:45

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH] Add Apple NLS

On Fri, 1 Jun 2012 12:36:11 -0700
Yinghai Lu <[email protected]> wrote:

> On Thu, May 17, 2012 at 9:36 PM, Vladimir '__-coder/phcoder' Serbinenko
> <[email protected]> wrote:
> >> Also, I note that the unicode files have
> >>
> >> __ __ __ MODULE_LICENSE("Dual BSD/GPL");
> >>
> >> Where did this come from? __Is this a thing you decided upon or is it
> >> unicode.org's license requirement?
> >>
>
> looks like Makefile change is not right... it has hard code =m for new modules.
>
> those line should be removed.

Yup. This?


From: Andrew Morton <[email protected]>
Subject: fs/nls/Makefile: remove bogus CONFIG_ assignments

I assume these were debug things whcih snuck through.

Reported-by: Yinghai Lu <[email protected]>
Cc: Vladimir Serbinenko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

fs/nls/Makefile | 12 ------------
1 file changed, 12 deletions(-)

diff -puN fs/nls/Makefile~fs-nls-makefile-remove-bogus-config_-assignemnts fs/nls/Makefile
--- a/fs/nls/Makefile~fs-nls-makefile-remove-bogus-config_-assignemnts
+++ a/fs/nls/Makefile
@@ -2,18 +2,6 @@
# Makefile for native language support
#

-CONFIG_NLS_MACCELTIC=m
-CONFIG_NLS_MACCENTEURO=m
-CONFIG_NLS_MACCROATIAN=m
-CONFIG_NLS_MACCYRILLIC=m
-CONFIG_NLS_MACGAELIC=m
-CONFIG_NLS_MACGREEK=m
-CONFIG_NLS_MACICELAND=m
-CONFIG_NLS_MACINUIT=m
-CONFIG_NLS_MACROMANIAN=m
-CONFIG_NLS_MACROMAN=m
-CONFIG_NLS_MACTURKISH=m
-
obj-$(CONFIG_NLS) += nls_base.o

obj-$(CONFIG_NLS_CODEPAGE_437) += nls_cp437.o
_