• bug fix in awthemes with Tcl 9

    From meshparts@alexandru.dadalau@meshparts.de to comp.lang.tcl on Wed Oct 15 20:19:40 2025
    From Newsgroup: comp.lang.tcl

    awthemes with Tcl 9 causes on some Windows computers this error:

    ---------------------------
    Error in startup script
    ---------------------------
    error reading "rc501": invalid or incomplete multibyte or wide character
    while executing
    "read $fh $fs"
    (procedure "_readFile" line 4)
    invoked from within
    "_readFile $fn"
    (procedure "_loadImageData" line 56)
    invoked from within
    "_loadImageData $theme $vars(image.dir.awthemes)"
    (procedure "::ttk::awthemes::init" line 266)
    invoked from within
    "::ttk::awthemes::init $theme"
    (procedure "init" line 4)
    invoked from within
    "init"
    (in namespace eval "::ttk::theme::awdark" script line 56)
    invoked from within
    "namespace eval ::ttk::theme::awdark {

    proc setBaseColors { } {
    variable colors

    array set colors {
    style.arrow solid-bg
    ..."
    (file "D:/MESHPARTS-Software/MESHPARTS2_20251015_x64.exe/lib/awthemes/awdark.tcl" line 19)
    invoked from within
    "source D:/MESHPARTS-Software/MESHPARTS2_20251015_x64.exe/lib/awthemes/awdark.tcl"
    ("package ifneeded ttk::theme::awdark 7.12" script)
    invoked from within
    "packag ...
    ---------------------------
    OK
    ---------------------------

    I fixed the issue in _readFile by adding the line "fconfigure $fh
    -profile tcl8":

    proc _readFile { fn } {
    set fh [open $fn]
    fconfigure $fh -profile tcl8
    set fs [file size $fn]
    set data [read $fh $fs]
    close $fh
    return $data
    }

    I found the repo on sourceforge but could not find an option to open a
    ticket or make a pull request...


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From nab@user2230@newsgrouper.org.invalid to comp.lang.tcl on Wed Oct 15 19:39:05 2025
    From Newsgroup: comp.lang.tcl


    meshparts <alexandru.dadalau@meshparts.de> posted:

    awthemes with Tcl 9 causes on some Windows computers this error:

    ---------------------------
    Error in startup script
    ---------------------------
    error reading "rc501": invalid or incomplete multibyte or wide character
    while executing
    "read $fh $fs"
    (procedure "_readFile" line 4)
    invoked from within
    "_readFile $fn"
    (procedure "_loadImageData" line 56)
    invoked from within
    "_loadImageData $theme $vars(image.dir.awthemes)"
    (procedure "::ttk::awthemes::init" line 266)
    invoked from within
    "::ttk::awthemes::init $theme"
    (procedure "init" line 4)
    invoked from within
    "init"
    (in namespace eval "::ttk::theme::awdark" script line 56)
    invoked from within
    "namespace eval ::ttk::theme::awdark {

    proc setBaseColors { } {
    variable colors

    array set colors {
    style.arrow solid-bg
    ..."
    (file "D:/MESHPARTS-Software/MESHPARTS2_20251015_x64.exe/lib/awthemes/awdark.tcl" line 19)
    invoked from within
    "source D:/MESHPARTS-Software/MESHPARTS2_20251015_x64.exe/lib/awthemes/awdark.tcl"
    ("package ifneeded ttk::theme::awdark 7.12" script)
    invoked from within
    "packag ...
    ---------------------------
    OK
    ---------------------------

    I fixed the issue in _readFile by adding the line "fconfigure $fh
    -profile tcl8":

    proc _readFile { fn } {
    set fh [open $fn]
    fconfigure $fh -profile tcl8
    set fs [file size $fn]
    set data [read $fh $fs]
    close $fh
    return $data
    }

    I found the repo on sourceforge but could not find an option to open a ticket or make a pull request...



    Hi,
    I also use awdark theme on Windows and I did not saw such issue.
    And no users of my app did report such issue.

    Does you tcl/tk is compiled with -municode (if that matters....)?

    ++
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Paul Obermeier@obermeier@poSoft.de to comp.lang.tcl on Wed Oct 15 22:36:07 2025
    From Newsgroup: comp.lang.tcl

    Am 15.10.2025 um 20:19 schrieb meshparts:
    awthemes with Tcl 9 causes on some Windows computers this error:

    ---------------------------
    Error in startup script
    ---------------------------
    error reading "rc501": invalid or incomplete multibyte or wide character
        while executing
    "read $fh $fs"
        (procedure "_readFile" line 4)
        invoked from within
    "_readFile $fn"
        (procedure "_loadImageData" line 56)
        invoked from within
    "_loadImageData $theme $vars(image.dir.awthemes)"
        (procedure "::ttk::awthemes::init" line 266)
        invoked from within
    "::ttk::awthemes::init $theme"
        (procedure "init" line 4)
        invoked from within
    "init"
        (in namespace eval "::ttk::theme::awdark" script line 56)
        invoked from within
    "namespace eval ::ttk::theme::awdark {

      proc setBaseColors { } {
        variable colors

        array set colors {
            style.arrow           solid-bg
     ..."
        (file "D:/MESHPARTS-Software/MESHPARTS2_20251015_x64.exe/lib/awthemes/awdark.tcl" line 19)
        invoked from within
    "source D:/MESHPARTS-Software/MESHPARTS2_20251015_x64.exe/lib/awthemes/awdark.tcl"
        ("package ifneeded ttk::theme::awdark 7.12" script)
        invoked from within
    "packag ...
    ---------------------------
    OK
    ---------------------------

    I fixed the issue in _readFile by adding the line "fconfigure $fh -profile tcl8":

      proc _readFile { fn } {
        set fh [open $fn]
        fconfigure $fh -profile tcl8
        set fs [file size $fn]
        set data [read $fh $fs]
        close $fh
        return $data
      }

    I found the repo on sourceforge but could not find an option to open a ticket or make a pull request...



    The SVG images contained in awthemes 10.4.0 can all be read using _readFile with Tcl/Tk 9.0.2.
    Did you change some of these files?

    I would recommend to read the files in binary mode, i.e. set fh [open $fn "rb"] instead of using the -profile option, which does not work with Tcl/Tk 8.

    Paul
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From meshparts@alexandru.dadalau@meshparts.de to comp.lang.tcl on Fri Oct 17 11:05:45 2025
    From Newsgroup: comp.lang.tcl

    Am 15.10.2025 um 21:39 schrieb nab:

    meshparts <alexandru.dadalau@meshparts.de> posted:

    awthemes with Tcl 9 causes on some Windows computers this error:

    ---------------------------
    Error in startup script
    ---------------------------
    error reading "rc501": invalid or incomplete multibyte or wide character
    while executing
    "read $fh $fs"
    (procedure "_readFile" line 4)
    invoked from within
    "_readFile $fn"
    (procedure "_loadImageData" line 56)
    invoked from within
    "_loadImageData $theme $vars(image.dir.awthemes)"
    (procedure "::ttk::awthemes::init" line 266)
    invoked from within
    "::ttk::awthemes::init $theme"
    (procedure "init" line 4)
    invoked from within
    "init"
    (in namespace eval "::ttk::theme::awdark" script line 56)
    invoked from within
    "namespace eval ::ttk::theme::awdark {

    proc setBaseColors { } {
    variable colors

    array set colors {
    style.arrow solid-bg
    ..."
    (file
    "D:/MESHPARTS-Software/MESHPARTS2_20251015_x64.exe/lib/awthemes/awdark.tcl" >> line 19)
    invoked from within
    "source
    D:/MESHPARTS-Software/MESHPARTS2_20251015_x64.exe/lib/awthemes/awdark.tcl" >> ("package ifneeded ttk::theme::awdark 7.12" script)
    invoked from within
    "packag ...
    ---------------------------
    OK
    ---------------------------

    I fixed the issue in _readFile by adding the line "fconfigure $fh
    -profile tcl8":

    proc _readFile { fn } {
    set fh [open $fn]
    fconfigure $fh -profile tcl8
    set fs [file size $fn]
    set data [read $fh $fs]
    close $fh
    return $data
    }

    I found the repo on sourceforge but could not find an option to open a
    ticket or make a pull request...



    Hi,
    I also use awdark theme on Windows and I did not saw such issue.
    And no users of my app did report such issue.

    Does you tcl/tk is compiled with -municode (if that matters....)?

    ++

    The error occures until now on just one of many tested computers.
    The difference is (to my knowlege) that this computer operates on
    Windows Server 10, not Windows Home/Professional 11.
    Other differences could of course exist.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From meshparts@alexandru.dadalau@meshparts.de to comp.lang.tcl on Fri Oct 17 11:09:50 2025
    From Newsgroup: comp.lang.tcl

    Am 15.10.2025 um 22:36 schrieb Paul Obermeier:
    Am 15.10.2025 um 20:19 schrieb meshparts:
    awthemes with Tcl 9 causes on some Windows computers this error:

    ---------------------------
    Error in startup script
    ---------------------------
    error reading "rc501": invalid or incomplete multibyte or wide character
         while executing
    "read $fh $fs"
         (procedure "_readFile" line 4)
         invoked from within
    "_readFile $fn"
         (procedure "_loadImageData" line 56)
         invoked from within
    "_loadImageData $theme $vars(image.dir.awthemes)"
         (procedure "::ttk::awthemes::init" line 266)
         invoked from within
    "::ttk::awthemes::init $theme"
         (procedure "init" line 4)
         invoked from within
    "init"
         (in namespace eval "::ttk::theme::awdark" script line 56)
         invoked from within
    "namespace eval ::ttk::theme::awdark {

       proc setBaseColors { } {
         variable colors

         array set colors {
             style.arrow           solid-bg
      ..."
         (file "D:/MESHPARTS-Software/MESHPARTS2_20251015_x64.exe/lib/
    awthemes/awdark.tcl" line 19)
         invoked from within
    "source D:/MESHPARTS-Software/MESHPARTS2_20251015_x64.exe/lib/
    awthemes/awdark.tcl"
         ("package ifneeded ttk::theme::awdark 7.12" script)
         invoked from within
    "packag ...
    ---------------------------
    OK
    ---------------------------

    I fixed the issue in _readFile by adding the line "fconfigure $fh -
    profile tcl8":

       proc _readFile { fn } {
         set fh [open $fn]
         fconfigure $fh -profile tcl8
         set fs [file size $fn]
         set data [read $fh $fs]
         close $fh
         return $data
       }

    I found the repo on sourceforge but could not find an option to open a
    ticket or make a pull request...



    The SVG images contained in awthemes 10.4.0 can all be read using
    _readFile with Tcl/Tk 9.0.2.
    Did you change some of these files?

    I would recommend to read the files in binary mode, i.e. set fh [open
    $fn "rb"]
    instead of using the -profile option, which does not work with Tcl/Tk 8.

    Paul

    I did not changed any of the images contained by the awthemes package.
    Okay, I guess it's not problem to remove "-profile tcl8" and add "open
    $fn rb" instead.
    The questions is, how can we update the official package so that this
    will not happen again?
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Harald Oehlmann@wortkarg3@yahoo.com to comp.lang.tcl on Fri Oct 17 11:26:57 2025
    From Newsgroup: comp.lang.tcl

    Am 17.10.2025 um 11:09 schrieb meshparts:
    Am 15.10.2025 um 22:36 schrieb Paul Obermeier:
    Am 15.10.2025 um 20:19 schrieb meshparts:
    awthemes with Tcl 9 causes on some Windows computers this error:

    ---------------------------
    Error in startup script
    ---------------------------
    error reading "rc501": invalid or incomplete multibyte or wide character >>>      while executing
    "read $fh $fs"
         (procedure "_readFile" line 4)
         invoked from within
    "_readFile $fn"
         (procedure "_loadImageData" line 56)
         invoked from within
    "_loadImageData $theme $vars(image.dir.awthemes)"
         (procedure "::ttk::awthemes::init" line 266)
         invoked from within
    "::ttk::awthemes::init $theme"
         (procedure "init" line 4)
         invoked from within
    "init"
         (in namespace eval "::ttk::theme::awdark" script line 56)
         invoked from within
    "namespace eval ::ttk::theme::awdark {

       proc setBaseColors { } {
         variable colors

         array set colors {
             style.arrow           solid-bg
      ..."
         (file "D:/MESHPARTS-Software/MESHPARTS2_20251015_x64.exe/lib/
    awthemes/awdark.tcl" line 19)
         invoked from within
    "source D:/MESHPARTS-Software/MESHPARTS2_20251015_x64.exe/lib/
    awthemes/awdark.tcl"
         ("package ifneeded ttk::theme::awdark 7.12" script)
         invoked from within
    "packag ...
    ---------------------------
    OK
    ---------------------------

    I fixed the issue in _readFile by adding the line "fconfigure $fh -
    profile tcl8":

       proc _readFile { fn } {
         set fh [open $fn]
         fconfigure $fh -profile tcl8
         set fs [file size $fn]
         set data [read $fh $fs]
         close $fh
         return $data
       }

    I found the repo on sourceforge but could not find an option to open
    a ticket or make a pull request...



    The SVG images contained in awthemes 10.4.0 can all be read using
    _readFile with Tcl/Tk 9.0.2.
    Did you change some of these files?

    I would recommend to read the files in binary mode, i.e. set fh [open
    $fn "rb"]
    instead of using the -profile option, which does not work with Tcl/Tk 8.

    Paul

    I did not changed any of the images contained by the awthemes package.
    Okay, I guess it's not problem to remove "-profile tcl8" and add "open
    $fn rb" instead.
    The questions is, how can we update the official package so that this
    will not happen again?

    The package is orphaned. A maintainer is required.
    Great wizard Brad Lanam was idssapointed by the release politics and
    quitted Tk. One way to get it maintained would be to add it to the
    orphaned packages repository at github.
    To my knowledge, Paul and Christian have updated versions in their copies.

    Take care,
    Harald
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Paul Obermeier@obermeier@poSoft.de to comp.lang.tcl on Fri Oct 17 18:46:53 2025
    From Newsgroup: comp.lang.tcl

    Am 17.10.2025 um 11:26 schrieb Harald Oehlmann:
    Am 17.10.2025 um 11:09 schrieb meshparts:
    Am 15.10.2025 um 22:36 schrieb Paul Obermeier:
    Am 15.10.2025 um 20:19 schrieb meshparts:
    awthemes with Tcl 9 causes on some Windows computers this error:

    ---------------------------
    Error in startup script
    ---------------------------
    error reading "rc501": invalid or incomplete multibyte or wide character >>>>      while executing
    "read $fh $fs"
         (procedure "_readFile" line 4)
         invoked from within
    "_readFile $fn"
         (procedure "_loadImageData" line 56)
         invoked from within
    "_loadImageData $theme $vars(image.dir.awthemes)"
         (procedure "::ttk::awthemes::init" line 266)
         invoked from within
    "::ttk::awthemes::init $theme"
         (procedure "init" line 4)
         invoked from within
    "init"
         (in namespace eval "::ttk::theme::awdark" script line 56)
         invoked from within
    "namespace eval ::ttk::theme::awdark {

       proc setBaseColors { } {
         variable colors

         array set colors {
             style.arrow           solid-bg
      ..."
         (file "D:/MESHPARTS-Software/MESHPARTS2_20251015_x64.exe/lib/ awthemes/awdark.tcl" line 19)
         invoked from within
    "source D:/MESHPARTS-Software/MESHPARTS2_20251015_x64.exe/lib/ awthemes/awdark.tcl"
         ("package ifneeded ttk::theme::awdark 7.12" script)
         invoked from within
    "packag ...
    ---------------------------
    OK
    ---------------------------

    I fixed the issue in _readFile by adding the line "fconfigure $fh - profile tcl8":

       proc _readFile { fn } {
         set fh [open $fn]
         fconfigure $fh -profile tcl8
         set fs [file size $fn]
         set data [read $fh $fs]
         close $fh
         return $data
       }

    I found the repo on sourceforge but could not find an option to open a ticket or make a pull request...



    The SVG images contained in awthemes 10.4.0 can all be read using _readFile with Tcl/Tk 9.0.2.
    Did you change some of these files?

    I would recommend to read the files in binary mode, i.e. set fh [open $fn "rb"]
    instead of using the -profile option, which does not work with Tcl/Tk 8. >>>
    Paul

    I did not changed any of the images contained by the awthemes package.
    Okay, I guess it's not problem to remove "-profile tcl8" and add "open $fn rb" instead.
    The questions is, how can we update the official package so that this will not happen again?

    The package is orphaned. A maintainer is required.
    Great wizard Brad Lanam was idssapointed by the release politics and quitted Tk. One way to get it maintained would be to add it to the orphaned packages repository at github.
    To my knowledge, Paul and Christian have updated versions in their copies.

    Take care,
    Harald

    The awthemes 10.4.0 version in BAWT is identical to the original version from SourceForge.

    Paul
    --- Synchronet 3.21a-Linux NewsLink 1.2