Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace replacement character #1570

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ and this project adheres to
import { parseCoins } from "@cosmjs/amino";
```

### Fixed

- @cosmjs/encoding: Avoid using replacement character in doc comment to make
external tools happy. ([#1570])

[#1570]: https://github.com/cosmos/cosmjs/pull/1570

## [0.32.2] - 2023-12-19

### Fixed
Expand Down
5 changes: 3 additions & 2 deletions packages/encoding/src/utf8.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ export function toUtf8(str: string): Uint8Array {
/**
* Takes UTF-8 data and decodes it to a string.
*
* In lossy mode, the replacement character � is used to substitude invalid
* encodings. By default lossy mode is off and invalid data will lead to exceptions.
* In lossy mode, the [REPLACEMENT CHARACTER](https://en.wikipedia.org/wiki/Specials_(Unicode_block))
* is used to substitude invalid encodings.
* By default lossy mode is off and invalid data will lead to exceptions.
*/
export function fromUtf8(data: Uint8Array, lossy = false): string {
const fatal = !lossy;
Expand Down
Loading