Skip to content

πŸ› Bug: Unicode Get MangledΒ #101

Closed

Description

@GiuseppeIII

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Expected

const test = dedent`😊`;
returns 😊

Actual

const test = dedent`😊`;
returns \u{1f60a}

Additional Info

For comparison doing
const test = `😊`;
returns 😊 correctly.

This can be worked around by doing something like
dedent`${'😊'}`;
for all unicode characters.

Activity

  1. JoshuaKGoldberg commented on Jun 24, 2025

    @JoshuaKGoldberg
    Collaborator

    Hmm, I don't reproduce this locally.

    import dedent from "dedent";
    
    const test = dedent`😊`;
    
    console.log({ test });
    { test: '😊' }
    

    https://github.com/JoshuaKGoldberg/repros/tree/dedent-and-unicode-characters

    Do you have a minimum reproduction you can share?

  2. GiuseppeIII commented on Jun 24, 2025

    @GiuseppeIII
    Author

    Thanks for testing! I get the same (working) result as you in your repro. I am able to reproduce the issue by using bun instead of node in your repro (bun index.js), so this is likely just a bun-node compatibility issue rather than an issue with this library. Interestingly ts-dedent does seem to work in this case for both bun and node. Apologies. Closing as the issue doesn't seem to originate here.

  3. KaKi87 commented on Aug 11, 2025

    @KaKi87

    Hi,

    It would still be nice for dedent to support Bun properly.

    I also am not experiencing any issue with outdent.

    Thanks

  4. JoshuaKGoldberg commented on Aug 12, 2025

    @JoshuaKGoldberg
    Collaborator

    Ah, I hadn't noticed that this was a Bun issue. I think it's reasonable to re-open (fyi @GiuseppeIII, we can file a new issue or you could unsubscribe here if you don't want notifications). I don't personally use Bun but if someone wants to send a PR with instructions on how you're testing it I'd be happy to review. Thanks all!

  5. mister-ben commented on Dec 11, 2025

    @mister-ben
    Contributor

    Bun issue: oven-sh/bun#8745
    A PR has been open a while but it remains unfixed: oven-sh/bun#15047

  6. added a commit that references this issue on Dec 17, 2025
    f7cb548
  7. JoshuaKGoldberg commented on Dec 17, 2025

    @JoshuaKGoldberg
    Collaborator

    Published to dedent@1.7.1 on npm. πŸš€

  8. github-actions commented on Mar 1, 2026

    @github-actions

    πŸŽ‰ This is included in version v1.7.1 πŸŽ‰

    The release is available on:

    Cheers! πŸ“¦πŸš€

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

    status: accepting prsPlease, send a pull request to resolve this!type: bugSomething isn't working :(

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions