WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > Unicode
Pages (9): [1] 2 3 » ... Last »   Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Israel

Unicode

Jim Park has issued a patch to add Unicode support to NSIS. Currently it's a completely different build that can create nothing but Unicode installers (no Windows 9x support).

Please help me test it for speedier integration.

https://sourceforge.net/tracker/?fu...;group_id=22049

You can download a pre-built version from:

http://www.scratchpaper.com/nsis-05...icode-setup.exe

__________________
NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 09-15-2007 10:41 AM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

Thanks for posting that kichik.

A few things to note. The Unicode NSIS installer is COMPLETELY Unicode. This means that your NSI script must also be Unicode (UTF-16LE). This can easily be done by using Notepad. Just change the encoding to "Unicode" and that will do it.

Note that the plugins you may be relying on will not work unless they are also built with Unicode in mind. This means that the access to the global stack that is used to transmit information back and forth from plugin to NSIS must contain Unicode (wchar_t) strings.

*** Developers ***
If you are a plugin author, it shouldn't be too difficult to make the changes. You can take a look at what I did for the standard plugins that ship with NSIS. The source is here:

http://www.scratchpaper.com/source.zip

If you look at ExDLL, you will notice new functions that will help you with the translation of the stack as well. For instance, if you DLL only cares about ASCII codesets, then you may not need to do much modifications at all. It just needs to call the new functions that automatically translate the stack's strings from Unicode to ANSI and ANSI to Unicode. But most likely, if you are dealing with user entered strings, you will need to make your DLL completely Unicode aware as well.

The source uses TCHARs so you can target building both ANSI and Unicode versions of NSIS. It is based on NSIS 2.29 with some bug fixes and minor tweaks. If you are interested, the ANSI version of the binary built with the same source code is also here:

http://www.scratchpaper.com/nsis-05...7.cvs-setup.exe

Please look at the tracker submission for more information about building the source yourself. I developed on VS2005 and I would be surprised if it builds on the other platforms. Even if they do, I did not change the SCONS config files for the other platforms to define _UNICODE and UNICODE which is what's needed for the source to be built as Unicode.

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 09-15-2007 01:23 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Israel

Source code link:

http://www.scratchpaper.com/source.zip

ANSI version link:

http://www.scratchpaper.com/nsis-05...7.cvs-setup.exe

__________________
NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 09-17-2007 08:45 PM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
Joel
Debian user
(Forum King)

Registered: Jan 2003
From: Ubuntu land

Is this will affect future versions? I mean I'm not a UNICODE fan, but if is it going to be...

__________________

* Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM.
* Ubuntu 9.10 64-bits.
* Firefox (Namoroka) 3.6.2.
* lighttpd, php5, perl, eruby, python.
* geany, XHTML & CSS & JavaScript, Gtk+, QT4, bindings.

Quick Link | Report this post to a moderator | IP: Logged

Joel is offline Old Post 09-18-2007 03:42 AM
Click Here to See the Profile for Joel Click here to Send Joel a Private Message Click Here to Email Joel Visit Joel's homepage! Find more posts by Joel Add Joel to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

Well, the niceness of this approach is that those who want the ANSI version for Win95/98/ME compatibility can use the ANSI version. For those who need support of languages that only Unicode can provide can use the Unicode version. It gives you a choice. And we can give you that choice with one code base.

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 09-18-2007 10:31 AM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
HaydenDevlin
Junior Member

Registered: Jul 2007
From:

I have just adapted my installer to use this unicode version for a russian language installer, and everything seems fine in russian except for some reason the welcome page has loads of question marks instead of the correct characters of the introduction text. It's weird because all the other panels are fine. Does anyone know what is going on here?

Cheers,

Hayden Devlin

Quick Link | Report this post to a moderator | IP: Logged

HaydenDevlin is offline Old Post 09-19-2007 01:09 PM
Click Here to See the Profile for HaydenDevlin Click here to Send HaydenDevlin a Private Message Click Here to Email HaydenDevlin Find more posts by HaydenDevlin Add HaydenDevlin to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

The introduction text should ALSO be Unicode. So open it up in Notepad and then save as Unicode encoding. That should work. So remember EVERYTHING must be Unicode. If you have an ASCII file, you need to make sure it's now UNICODE. Hope this helps.

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 09-20-2007 12:26 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
dienjd
Senior Member

Registered: Oct 2005
From:

Sounds great. One quick question: what happens when one of these builds gets run on 9x? Is it possible to detect in .onInit and show a MessageBox to the user, or would it just crash immediately? If the latter, then I guess the build could be wrapped by a non-Unicode build that does this detection and messaging.

Quick Link | Report this post to a moderator | IP: Logged

dienjd is offline Old Post 09-20-2007 03:41 PM
Click Here to See the Profile for dienjd Click here to Send dienjd a Private Message Click Here to Email dienjd Find more posts by dienjd Add dienjd to your buddy list Edit/Delete Message Reply w/Quote
dienjd
Senior Member

Registered: Oct 2005
From:

quote:
Originally posted by dienjd
Sounds great. One quick question: what happens when one of these builds gets run on 9x? Is it possible to detect in .onInit and show a MessageBox to the user, or would it just crash immediately? If the latter, then I guess the build could be wrapped by a non-Unicode build that does this detection and messaging.


I decided to not be so lazy and just try for myself. I compiled Examples\bigtest.nsi and tried it on Windows 98. It crashed immediately, which is expected. However, there are ways to gracefully handle this, as I mentioned in my last post.

Quick Link | Report this post to a moderator | IP: Logged

dienjd is offline Old Post 09-20-2007 04:48 PM
Click Here to See the Profile for dienjd Click here to Send dienjd a Private Message Click Here to Email dienjd Find more posts by dienjd Add dienjd to your buddy list Edit/Delete Message Reply w/Quote
Comm@nder21
Major Dude

Registered: Jul 2003
From: germany, b-w

how about Microsoft Layer for Unicode on Win95/98/ME (MSLU)?

http://www.microsoft.com.nsatc.net/...u_announce.mspx

sounds easy to integrate.

__________________
hand by comm@nder21
----------
WiKi pages:CreateInternetShortcut|Enhanced FindWindow|Parse CSV-Data|Open/Close CD-Drive|Installer without Icon|Vista application compatibility

Quick Link | Report this post to a moderator | IP: Logged

Comm@nder21 is offline Old Post 09-20-2007 11:43 PM
Click Here to See the Profile for Comm@nder21 Click here to Send Comm@nder21 a Private Message Click Here to Email Comm@nder21 Visit Comm@nder21's homepage! Find more posts by Comm@nder21 Add Comm@nder21 to your buddy list Edit/Delete Message Reply w/Quote
Anders
Major Dude

Registered: Jun 2002
From: N/A

yeah, but you have to ship the MSLU dll along with the installer

__________________
IntOp $PostCount $PostCount + 1

Quick Link | Report this post to a moderator | IP: Logged

Anders is offline Old Post 09-20-2007 11:57 PM
Click Here to See the Profile for Anders Click here to Send Anders a Private Message Visit Anders's homepage! Find more posts by Anders Add Anders to your buddy list Edit/Delete Message Reply w/Quote
Comm@nder21
Major Dude

Registered: Jul 2003
From: germany, b-w

well, at least nsis may get compiled against mslu, so it still works normal on win2k/xp/vista, but also MAY work on win95/98/me IF the user has mslu installed.

__________________
hand by comm@nder21
----------
WiKi pages:CreateInternetShortcut|Enhanced FindWindow|Parse CSV-Data|Open/Close CD-Drive|Installer without Icon|Vista application compatibility

Quick Link | Report this post to a moderator | IP: Logged

Comm@nder21 is offline Old Post 09-21-2007 12:06 AM
Click Here to See the Profile for Comm@nder21 Click here to Send Comm@nder21 a Private Message Click Here to Email Comm@nder21 Visit Comm@nder21's homepage! Find more posts by Comm@nder21 Add Comm@nder21 to your buddy list Edit/Delete Message Reply w/Quote
dienjd
Senior Member

Registered: Oct 2005
From:

When converting ANSI files to Unicode, I've noticed that the conversion works fine with Notepad, but converting using Textpad or the iconv program on FreeBSD results in the Unicode file not working with Unicode NSIS.

While testing this patched version of NSIS, I want to be able to automatically convert files as part of a build process instead of maintaining separate copies of the same files but just in different encodings. Notepad doesn't seem to have a command line interface other than 'notepad.exe filename.txt'. I guess I could make something that launches Notepad and hooks the window to do a Save As

This isn't a big deal, but it would be nice to have. Anyone have ideas on how to do this other than the ugly window hooking method?

Quick Link | Report this post to a moderator | IP: Logged

dienjd is offline Old Post 09-21-2007 02:56 PM
Click Here to See the Profile for dienjd Click here to Send dienjd a Private Message Click Here to Email dienjd Find more posts by dienjd Add dienjd to your buddy list Edit/Delete Message Reply w/Quote
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Israel

There are a few possible reasons. The first is conversion to a wrong charset. Even Unicode has multiple charsets available. Make sure you convert to UTF-16LE.

Another reason could be a missing BOM. Try perpending the file content with FF FE (the actual bytes, not text).

__________________
NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 09-21-2007 03:03 PM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

My thoughts are exactly the same as kichik's. Here's a little utility I wrote called a2u.exe that converts an ANSI codepage text file to Unicode. You provide what codepage to use. So it can be run regardless of your OS codepage setting. So this will fit your bill in making this whole process automated. (I didn't convert all the include files, example, etc., by hand, you know?) It should also be helpful in converting your current NSIS scripts to Unicode as well.

I included the source as well so you can modify it to work anyway you want.

Look in http://www.scratchpaper.com/a2u.zip or I'm attaching the file here as well.

Enjoy.

Attachment: a2u.zip
This has been downloaded 362 time(s).

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 09-21-2007 05:03 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
dienjd
Senior Member

Registered: Oct 2005
From:

Thanks for the utility and patch. The Unicode support will hopefully save me from having to use InstallShield!

Quick Link | Report this post to a moderator | IP: Logged

dienjd is offline Old Post 09-21-2007 05:11 PM
Click Here to See the Profile for dienjd Click here to Send dienjd a Private Message Click Here to Email dienjd Find more posts by dienjd Add dienjd to your buddy list Edit/Delete Message Reply w/Quote
Benski
Ben Allison
Lead Developer
Winamp Dev Team

Registered: Jan 2005
From: Ashburn, VA

Jim -

We'll give this thing a good workout soon.

Quick Link | Report this post to a moderator | IP: Logged

Benski is offline Old Post 09-23-2007 02:22 AM
Click Here to See the Profile for Benski Click here to Send Benski a Private Message Click Here to Email Benski Visit Benski's homepage! Find more posts by Benski Add Benski to your buddy list Edit/Delete Message Reply w/Quote
Clammerz
Junior Member

Registered: Apr 2006
From:

Anymore news about this?

Will it be integrated into the main NSIS branch someday? Any extreme rough timeframes if so? (something like 3 months, 6months a year, etc?)

I suggest making this sticky since it's pretty important news.

Thanks heaps for the patch work Jim. Your efforts are greatly appreciated.

Sidenote question: If you are using the System plugin for API calls, will you have to use the Unicode calls, or can you use the normal ANSI calls too?

Quick Link | Report this post to a moderator | IP: Logged

Clammerz is offline Old Post 09-29-2007 07:02 PM
Click Here to See the Profile for Clammerz Click here to Send Clammerz a Private Message Find more posts by Clammerz Add Clammerz to your buddy list Edit/Delete Message Reply w/Quote
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Israel

Should be integrated, no timeframes and System can already handle both ANSI and Unicode so nothing should change.

__________________
NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 09-29-2007 07:58 PM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

The only change made to System is that all the calls default to Unicode strings rather than ANSI strings. So for example, if you specified MessageBox(...), then it will actualyl call MessageBoxW(...). As long as you provide the right function signature, then the System will work as you expect. I just had to rework some of the interfacing back and forth through the NSIS global stack but using it should be the same.

You WANT to use the Unicode functions by default because while it will automatically convert Unicode strings to ANSI codepage and back when you call ANSI functions, you may actually lose vital information or get bad behavior if the user's computer's code page setting is different from what you'd expect. And definitely things will not work if you are trying to provide an installer for a Unicode only language.

If you are converting your script from the ANSI NSIS to Unicode, and you are using the System plugin, look for functions that are ANSI only. Most of these end in "A". Change them to use Unicode. Or just specify their "TCHAR" versions -- i.e. MessageBox instead of MessageBoxW or MessageBoxA. Then the correct one will be picked up by your NSIS installer.

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 10-01-2007 07:48 AM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

Kichik, I was wondering, also, of what it would take for it to be incorporated into the NSIS trunk. Since the source for Unicode NSIS can generate both Unicode and ANSI versions of NSIS, bug fixes in this version of the source will benefit both the Unicode and the ANSI version. I would hate to see the Unicode NSIS code get orphaned. If we wait much longer the code base for the NSIS and Unicode NSIS will diverge too much and someone's going to have to redo the 1.5 months of fulltime work to make it work again.

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 10-04-2007 07:18 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Israel

As I see it, the first step is a completely separate build for Unicode (like 8192 string and logging builds) which will minimally affect the main build. Later, the compiler can start moving towards being able to create either type of installers. Finally, the stubs could be made common so ANSI will be automatically used on 9x and Unicode on any capable system.

I, too, would hate to see the code gets orphaned, requiring more and more work with each passing version. To get to first step done and integrate it as a separate build, I'd want to make it as hassle free as possible. Currently it seems there are more than a few changes that'd require extra maintenance and will serve useful only for the Unicode build. All of the SConscript changes are good example. There is no need for duplication of examples and such - makensis.exe should be able to read ANSI scripts and differentiate Unicode scripts according to BOM.

Another minor example is wininit.ini handling. Since that's only supported on 9x, the code could be completely removed for Unicode builds and there's no need for the conversions and Unicode specific code paths.

Lines 716-726 in Source\exehead\util.c could be reduced to a cast to char*.

NSIS Menu doesn't have to be Unicode. But I guess it'd be useful for translated packages of NSIS itself. In that case, it'd be easier to have wxUSE_UNICODE defined externally or according to _UNICODE instead of having two setup.h.

In short, every #ifdef _UNICODE or separate Unicode file is more work down the line. I can't ask you to make all the changes, but that's what I'll do when I integrate it. I will probably do it gradually, but I'll definitly start with automatically generating the duplicate files or getting rid of the need for them.

If you do, however, wish to help with this, I can create a branch for this in the soon-to-live SVN repository where you can check-in the changes. I will also do my best to sync it with trunk for every released version (which hopefully won't be too many).

__________________
NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 10-05-2007 02:07 PM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Israel

Just had a look at Benski's Unicode branch and saw he used a nice trick to get around the CHAR4_TO_DWORD optimization - QTCHAR.

http://nsis.cvs.sourceforge.net/nsi...pathrev=UNICODE

__________________
NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 10-05-2007 02:13 PM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

Actually, I disagree that the examples and NSIS include files should be generated from a single source for both. Eventually, the number of languages supported for Unicode will continue to grow while the number ANSI languages have already stopped growing. The common subset (e.g. Latin I) may be able to share a common source but even then there are things like System calls that will be subtly different for ANSI and Unicode. Much like the C++ source itself, we may have to add #ifdef UNICODE or some equivalent into the NSIS scripts if we pursue having one source script for both. But again, I imagine that the Unicode languages will continue to grow which will never have an ANSI counterpart. And Win9x/ME OSes will continue to dwindle in significance.

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 10-11-2007 03:29 AM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Israel

But currently there are none and so it generates an unjustified work overhead. Updating an example requires updating two files. That's always a cause for nice little "oops" bugs.

__________________
NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 10-15-2007 11:09 PM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

That is true. So for now, I do have that a2u.exe that I've uploaded here. We can use it as part of the build process to take the ANSI scripts and convert them to Unicode ones for those which are easily derivable. For those that do need hand tweaks (there may be a few), we can keep those separate. For scripts that use the System plugin, for example, we need only use the API without the "W" or "A" as the suffix i.e. don't use MessageBoxA or MessageBoxW just MessageBox and the correct version will be picked up by the System plugin. So I think it's quite possible to achieve a unified single source for most scripts.

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 10-16-2007 01:37 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

I may have misunderstood your post. If you mean that there are no languages that are Unicode-only, then here are some:
1. Amharic
2. Armenian
3. Assamese (India)
4. Bengali (India)
5. Divehi (Maldives)
6. Georgian
7. Gujarati
8. Hindi
9. Inukitut (Canada, Syllabics) -- not the Latin-based one
10. Kannada
11. Khmer (Cambodia)
12. Konkani
13. Marathi
14. Nepali
15. Punjabi
16. Sanskrit
17. Sinhala (Sri Lanka)
18. Telugu (India)

The list is growing. Also, many people including myself run apps localized to a different language than the codepage of the OS that they're running. So the desire for Unicode support for an installer is there and the need is getting stronger.

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 11-07-2007 04:11 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Israel

There are none in NSIS. And even if language files are added for those, it still doesn't justify having every example in Unicode as most examples don't demonstrate multiple languages and those that do, usually do this with a small collection of languages.

__________________
NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 11-07-2007 07:21 PM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
AxelMock
Junior Member

Registered: Apr 2007
From: Seltz, France

quote:
Originally posted by kichik
There are none in NSIS. And even if language files are added for those, it still doesn't justify having every example in Unicode as most examples don't demonstrate multiple languages and those that do, usually do this with a small collection of languages.


Hi,

I find the idea of a unicode capable NSIS compiler great.
I've built an (standard NSIS)installer for network drivers which currently supports 25 languages, including 2 RTL languages.

If we had to add some extra dialogs or messages all translation services would deliver unicode files.
I haven't yet understood or found a detailed explanation of how to safely convert unicode texts into NSIS codepage-based strings.
Being able to directly use unicode strings would significantly ease localization.

In my work I normally use PERL and the automated generation of Windows driver .inf files (UTF-16) is done by PERL scripts.
But NONE of the sources/templates, except for the NLS dependent parts (strings and readme files), are in UTF-16. As PERL uses UTF-8 internally and ASCII is a real subset of UTF-8 there is no need to have program sources in UTF-16.
When including a NLS file, which is in UTF-16, this is detected at read time.

I don't know if the Microsoft C++ API only supports UTF-16, but I think it should not be a great problem to have a smart "read file" function which does detection and conversion, even if internally all is handled in UTF-16.

Quick Link | Report this post to a moderator | IP: Logged

AxelMock is offline Old Post 11-08-2007 08:24 AM
Click Here to See the Profile for AxelMock Click here to Send AxelMock a Private Message Find more posts by AxelMock Add AxelMock to your buddy list Edit/Delete Message Reply w/Quote
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Israel

quote:
I don't know if the Microsoft C++ API only supports UTF-16, but I think it should not be a great problem to have a smart "read file" function which does detection and conversion, even if internally all is handled in UTF-16.
They support both ANSI and UTF-16. There is even a function for determining if a buffer is Unicode or not. The standard even defines special markers for files that specify if they're ANSI, UTF-8, UTF-16LE or UTF-16BE. They are called BOMs.

It shouldn't be too hard to make the compiler support both ANSI and UTF-16. But I'm just saying it won't serve too much of a purpose to have the examples in SVN in both ANSI and UTF-16. There are currently no examples whatsoever that need Unicode. If there will ever be, they can be specific to the Unicode build.

__________________
NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 11-08-2007 05:04 PM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

As I mentioned before, for the languages that have codepage support, I simply ran a a2u.exe to convert the ANSI script to the Unicode script. I did not hand edit all of those. I don't know 25 languages, after all. So you could have one source file for each language and then GENERATE ANSI and Unicode versions of the example files. So in essence, you never have "oops" mistakes because there is only one source.

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 11-08-2007 08:45 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
KrisAster
Junior Member

Registered: Aug 2005
From:

From your reply, Kichik, it seems as though there IS going to be a Unicode build of some form. Is this correct? Does that mean that this Unicode build is going to be integrated into the main release sometime soon?

If so, that will be great. I for one have need for an installer in one of the languages mentioned below (Georgian), and next year I may have need of one of the others. PLUS, the benefits of not having to switch code-pages in order to have the install show up with intelligible text is also very nice.

Additionally, how many people have tried this version of the installer? I'd like some idea of how stable it is and how it is supported on different OSes. My experience so far has been very good. I was able to build my install with the version made available here without any changes to my script (other than saving the file in Unicode), and it is a pretty large script (1K lines). I'm now in the process of localizing the Georgian version, and I'll make sure to post back with how successful the results were.

Unicode seems to be the wave of the future, and I'll be really happy to see NSIS make the path available for those of us who want it. After all, the product I'm shipping does not support any of the ANSI versions of Windows, and Microsoft doesn't support them anymore either.

Quick Link | Report this post to a moderator | IP: Logged

KrisAster is offline Old Post 11-08-2007 09:10 PM
Click Here to See the Profile for KrisAster Click here to Send KrisAster a Private Message Find more posts by KrisAster Add KrisAster to your buddy list Edit/Delete Message Reply w/Quote
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Israel

KrisAster, there's no time frame and my bet won't be on soon.

__________________
NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 11-08-2007 11:02 PM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

For those using the Unicode version of NSIS, I took the latest 2.33 source and merged the changes onto the Unicode version. The new binaries and source are posted to http://www.scratchpaper.com. Let me know if you find any problems with this release. Also let me know if you find the Unicode version useful.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 11-19-2007 09:59 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

I modified the Unicode language files in the installer to contain vernacular names for the various languages. So you can do something like this:

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 11-21-2007 04:39 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
havas
Junior Member

Registered: Nov 2007
From:

Thanks for this work. the unicode build works well.
I'm chinese, and using japanese windows edition to study japanese. And really many chinese language only nsis setup bother me which can't display correctly on my system.
Really great, hope this Unicode support feature will be merged into the official NSIS.

Quick Link | Report this post to a moderator | IP: Logged

havas is offline Old Post 11-24-2007 12:52 PM
Click Here to See the Profile for havas Click here to Send havas a Private Message Click Here to Email havas Find more posts by havas Add havas to your buddy list Edit/Delete Message Reply w/Quote
CodeSquid
Member

Registered: Dec 2001
From:

Thanks for your patch, it seems to be working great.

I'd love to see this included in the official source.

Quick Link | Report this post to a moderator | IP: Logged

CodeSquid is offline Old Post 11-27-2007 01:54 PM
Click Here to See the Profile for CodeSquid Click here to Send CodeSquid a Private Message Find more posts by CodeSquid Add CodeSquid to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

Unicode NSIS has been updated to support Georgian (a Unicode only language). Updated Unicode Simplified Chinese language files. Also fixed some bugs in
Unicode Turkish language file and Unicode zip2exe. Please give it a whirl and let me know if you see any more problems. As always, the site is http://www.scratchpaper.com

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 12-12-2007 08:48 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
prz
Junior Member

Registered: Apr 2006
From:

I'm trying to use your Unicode version. It works well until the use of some plugins.
I tryed to convert the GetVersion plugin of AfroUK.
I put your exDLL and recompiled with no success: the compiler give me some errors. I think that the problem is the definition of _UNICODE but I don't know where to put it (I don't know C++ and its compiling process).
If someone tells me how to do it, I think I'm able to translate the others plugin I need for my installer.

Thank you

Quick Link | Report this post to a moderator | IP: Logged

prz is offline Old Post 12-14-2007 03:54 PM
Click Here to See the Profile for prz Click here to Send prz a Private Message Click Here to Email prz Find more posts by prz Add prz to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

Well, it will be a bit difficult not knowing C++ if you want to convert other plugins. But you could try downloading the source from the NSIS branch, then download the source from my site. And you could compare the source files for a smaller plugin like LangDLL and see what the differences are.

BTW, other than the GetVersion plugin, what other plugins do you use?

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 12-15-2007 06:09 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 09:17 PM. Post New Thread    Post A Reply
Pages (9): [1] 2 3 » ... Last »   Last Thread   Next Thread
WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > Unicode
Show Printable Version
 | 
Email this Page
 | 
Subscribe to this Thread

Forum Jump:
 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is off
vB code is ON
Smilies are ON
[IMG] code is ON