Skip to content

Commit aa1ecf0

Browse files
committed
add encoding to webread in example
Our CI pipeline is running 24b on a system with an encoding different from UTF-8. That causes this `webread` command to return mangled characters, throwing off the example test.
1 parent 4fcab78 commit aa1ecf0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/SummarizeLargeDocumentsUsingChatGPTandMATLAB.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ loadenv(".env")
3030
Download and read the content from Alice's Adventures in Wonderland by Lewis Carroll from Project Gutenberg.
3131

3232

33-
First read the contents of the webpage.
33+
First read the contents of the webpage using the `webread` function. Specify the time out duration using the `weboptions` function. The HTML header from the source document does not specify the character encoding. To ensure good results independent of your language settings, also specify the character encoding using the `weboptions` function.
3434

3535
```matlab
36-
options = weboptions(Timeout=30);
36+
options = weboptions(Timeout=30,CharacterEncoding="UTF-8");
3737
code = webread("https://www.gutenberg.org/files/11/11-h/11-h.htm", options);
3838
longText = extractHTMLText(string(code));
3939
```
Binary file not shown.

0 commit comments

Comments
 (0)