Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with htmlcb and special characters

    Hi,
    I have a question about the htmlcb command. I am using Stata 16.

    I am creating the codebook of a dataset that has variable labels and value labels in Spanish, so with different accent marks and other special characters.

    I first created the standard codebook with the following syntax:
    Code:
    htmlcb, saving(Name.html) title("Title") self replace
    The resulting codebook includes all the desired information, but the special characters in the labels do not appear correctly. For example, the word 'cuál' appears as 'cuÃil'.

    However, when creating the short version of the codebook (which includes less information), the special characters appear in the correct way:
    Code:
    htmlcb, saving(Name.html) title("Title") fast self replace
    I don't understand why this happens, but I was wondering if there is a way to combine the two versions to create a standard codebook with correct labels.
    Thank you very much
    Roberto

  • #2
    It is about 6 years since I wrote that, so I don't remember the details. What you describe sounds like a problem with unicode characters. I had a quick look at my code and at a first glance I don't see a place where I processed the labels (which would be the place where I could mess them up). Instead, I think I just copied the raw strings directly in the codebook. Maybe looking at help unicode_advice helps?
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment

    Working...
    X