Skip to content

wrong docstring output encoding #96

Closed

Description

From Igor Novozhilov (@IgorNovozhilov) on March 23, 2017 20:49

Environment data

VS Code version: 1.11.0-insider
Python Extension version: 0.6.0
Python Version: 3.3.5
OS and version: win7-pro

Actual behavior

2017-03-23_23h32_44

Expected behavior

2017-03-23_23h38_48

Steps to reproduce:

  • write "ru" docstring
  • hovered methods

It's a heisenbug... The text with the wrong encoding appears not on every hover. He occasionally appears when auto-save file, even when editing parcels not related to the method or docstring.

A similar problem: https://github.com/DonJayamanne/pythonVSCode/issues/372

Settings

Your settings.json: no

Logs

no

Output from Console window (Help->Developer Tools menu)
no

Copied from original issue: DonJayamanne/pythonVSCode#844

Activity

  1. DonJayamanne commented on Nov 13, 2017

    @DonJayamanne
    Author

    From Igor Novozhilov (@IgorNovozhilov) on March 23, 2017 20:58

    I found 🐛. Wrong encoding appears only once executed linting file and highlight warnings.

  2. DonJayamanne commented on Nov 13, 2017

    @DonJayamanne
    Author

    Please could you provide some sample code and exact steps to replicate this issue.
    I'm having trouble replicating this at my end. Thanks for your help.

  3. DonJayamanne commented on Nov 13, 2017

    @DonJayamanne
    Author

    From Igor Novozhilov (@IgorNovozhilov) on April 6, 2017 18:5

    Occurs only on windows with RU-ru localization, and utf-8 py-file encoding.

    """ Модуль """
    
    def test():
        """ Описание функции """
        pass
    
    test()
  4. DonJayamanne commented on Nov 13, 2017

    @DonJayamanne
    Author

    From Marcus Schweda (@mdschweda) on July 18, 2017 19:8

    Same for any Umlaut (aöü)

    # -*- coding: utf-8 -*-
    """Dieses Modul enthält.... <---"""
    
    class Client(AuthenticatedClient):
    
        async def schema(self, entity_type: str, single: bool = False) -> object:
            """Fragt das Schema eines Typens von Eintrag ab.
    
            Parameters
            ----------
            entity_type : str
                Der Entitätstyp.... <---
            single : bool, optional
                Ein Wert, der bestimmt, ob das Schema alle referenzierten Entitätstypen.... <---
            """
            ....
  5. added
    area-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.
    bugIssue identified by VS Code Team member as probable bug
    on Nov 14, 2017
  6. MikhailArkhipov commented on Dec 12, 2017

    @MikhailArkhipov

    Related microsoft/vscode#5388 actually fixed in VSC right around March 2017.
    Currently I see that Russian and other languages working when file is saved in UTF-8 (BOM is not required). Things do get broken if file gets forcibly saved in OEM CP (console CP). VSC loads it incorrectly anyway.

    image

    If file is saved in UTF-8 (console CP is 866), VSC works properly

    image

  7. MikhailArkhipov commented on Dec 13, 2017

    @MikhailArkhipov

    May need to check settings

      // The default character set encoding to use when reading and writing files. This setting can be configured per language too.
      "files.encoding": "utf8",
    
      // When enabled, will attempt to guess the character set encoding when opening files. This setting can be configured per language too.
      "files.autoGuessEncoding": false,
    
  8. DonJayamanne commented on May 31, 2018

    @DonJayamanne
    Author

    Igor Novozhilov (@IgorNovozhilov)
    Apologies for the late response, but are you still experiencing this issue.
    Please feel free to re-open the issue if you are still experiencing this issue.
    Closing as it may have been resolved along with #100

  9. locked as resolved and limited conversation to collaborators on Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions