![]() |
#1 |
Junior Member
Join Date: Feb 2017
Posts: 19
|
${StrRep} and Unicode
Hello,
I'm using the code for the ${StrRep} function taken from http://nsis.sourceforge.net/StrRep in a separate nsh file. The problem is, when I use code: I get error HTML Code:
Can't change target charset after data already got compressed or header already changed! Regards, Alex |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
Put the Unicode attribute at the start of your .nsi
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Feb 2017
Posts: 19
|
Yes, this is obvious, but I was looking for a more elegant solution. How can several Exch and Push commands mess up compression?
|
![]() |
![]() |
![]() |
#4 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
Once you start adding code to a section/function the Unicode mode is locked. Technically I believe you can do Push "" etc. but once a non-empty string is used the mode is locked.
You must put code in a macro if you want to delay something. IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#5 |
Junior Member
Join Date: Feb 2017
Posts: 19
|
Yes, you're right, even this code produces the error:
code: even if I use the function at a much later state... |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|