I am using readstat_variable_set_display_width to set the variable display width when writing a sav file. It is working, meaning when reading the written file I can get the display variable width with readstat_variable_get_display_width and it looks correct.
However if the dataset contains a value which is a string with 256 characters or more, writing it and reading again, then when using readstat_variable_get_display_width I get 0, interestingly not only for the variable containing the long string, but for any other variable in the dataset.
The long string itself is read correctly.