mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
Merge pull request #1570 from cosmos/replacement-character
Replace replacement character
This commit is contained in:
commit
d7d9b7e353
@ -19,6 +19,13 @@ and this project adheres to
|
|||||||
import { parseCoins } from "@cosmjs/amino";
|
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
|
## [0.32.2] - 2023-12-19
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
@ -15,8 +15,9 @@ export function toUtf8(str: string): Uint8Array {
|
|||||||
/**
|
/**
|
||||||
* Takes UTF-8 data and decodes it to a string.
|
* Takes UTF-8 data and decodes it to a string.
|
||||||
*
|
*
|
||||||
* In lossy mode, the replacement character <EFBFBD> is used to substitude invalid
|
* In lossy mode, the [REPLACEMENT CHARACTER](https://en.wikipedia.org/wiki/Specials_(Unicode_block))
|
||||||
* encodings. By default lossy mode is off and invalid data will lead to exceptions.
|
* 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 {
|
export function fromUtf8(data: Uint8Array, lossy = false): string {
|
||||||
const fatal = !lossy;
|
const fatal = !lossy;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user