Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Nuke: Wrong encoding causing Unicode characters to change on each script save/open #4170

Closed
jeangjenq opened this issue Dec 4, 2022 · 1 comment · Fixed by #4171
Closed

Comments

@jeangjenq
Copy link

jeangjenq commented Dec 4, 2022

Running version
3.14.6
Windows 10 22H2

Describe the bug
Nuke is saving/opening script with the wrong encoding, causing unicode characters to more than double up in characters on each save/open. Eventually exponentially doubling script's filesize on each save.

To Reproduce
Steps to reproduce the behavior:

  1. Make sure you're running an installed version of OpenPype on Windows. This is because cx_Freeze is involved in this.
  2. Open an empty Nuke via OpenPype
  3. Paste this node
NoOp {
 inputs 0
 name NoOp1
 xpos 292
 ypos -224
 addUserKnob {20 User}
 addUserKnob {26 asd l "" +STARTLINE T ü}
}
  1. Look at pasted node, make sure the text knob on it says ü
  2. Save script via OpenPype.
  3. Close and reopen script, ü is now ü.
  4. Change is reflected in opening script in a text editor.

Expected behavior
Created unicode text should stay as it is, not change into other characters.

Screenshots
Before:
image
After:
image

On a rather heavily affected knob (After many save/open):
image

Desktop (please complete the following information):

  • OS: Windows 10 22H2
  • Host: Nuke 13.1v2

Additional context

  • The unicode character change seems consistent with change of encoding from UTF-8 to Windows-1252.
  • Problem does not exist on linux, or while running from tray on Windows.
  • We traced the problem to cx_Freeze is packaging its own version of TK and TCL, and applying environment variables to override its usage.
  • Installed version of OpenPype comes with these environment variable override:
TCLLIBRARY:C:\Program Files (x86)\OpenPype\3.14.0\lib\tkinter\tcl8.6
TKLIBRARY:C:\Program Files (x86)\OpenPype\3.14.0\lib\tkinter\tk8.6
  • Adding the below environment override to Nuke settings in OpenPype settings resolve this issue temperorily.
{
    TCL_LIBRARY:""
    TK_LIBRARY: ""
}

[cuID:OP-4557]

@iLLiCiTiT
Copy link
Member

Thanks for reporting the issue and resolving it at the same time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants