Git Product home page Git Product logo

Comments (4)

sinnbeck avatar sinnbeck commented on June 2, 2024 1

Ok I will look into a PR. For now I have just created my own Writer class, but of course this can be an issue if the package gets updated down the line :) I can perhaps add a check to ensure that it cannot start with those special as that is not allowed.

I will use this as a guide https://www.ibm.com/docs/en/spss-statistics/28.0.0?topic=SSLVMB_28.0.0/spss/base/syn_variables_variable_names.htm

from spss.

lestcape avatar lestcape commented on June 2, 2024

The $, #, and @ are special characters if they are written in a specific position, but they can also be used as part of the name if not. I think they are excluded here for simplicity. The reader must read it (otherwise we won't be able to read some files), but nothing forces the writer to allow it, since you can control how the file will be written. So I don't have a firm position on allowing the writer to use it or not. If you want that possibility to be included, please create a PR for that. If it doesn't affect anything else and the resulting file can be read, I don't see why it can't be merged.

from spss.

sinnbeck avatar sinnbeck commented on June 2, 2024

I will also suggest replacing A-Za-z with \w as that should allow any word character (eg. æøΓ₯ from the danish alphabet)

^(?!#)[\w0-9_\.#\x{4e00}-\x{9fa5}]+$

from spss.

lestcape avatar lestcape commented on June 2, 2024

Yes is the same, if is tested and we can write special characters without a problem, i don't see why not. This is allowed by the sav file specification. Just take care to not allow the inclusion of $, # in the first position and follow the that rules you linked.

from spss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.