0

I am a big Only Connect fan and I have been using the following web-app to create connecting walls: https://dev.to/terrychild/connections-3mod

The gameplay data is BASE64 encoded in the URL using the following pattern :

4|link0;clue0_0;clue0_1;clue0_2;clue0_3|link1;clue1_0...

I have created a database using Google Sheets in order to store the walls I create but I wanted to automate the process to make it easier to generate links when I enter or edit data without having to regenerate a link. I followed the instructions in the answer of the following question and it works pretty well. Encode google sheet rows into base64 string

However, the web-app doesn't decode accented characters properly when I am using an URL generated with the custom function. For example, the "é" character becomes "é", while it appears correctly when the url is created with the generator tool.

Function-generated link: http://www.moohar.com/only-connect/edit.html?NHxQcsOpdMOpcml0cyBldCBwYXJ0aWNpcGUgcGFzc8OpcyBpZGVudGlxdWVzO0hhdmU7TWFrZTtQYXk7U2F5fFByw6l0w6lyaXRzIGV0IHBhcnRpY2lwZXMgcGFzc8OpcyBlbiA8LUdIVD47Q2F0Y2g7QnV5O0ZpZ2h0O1RoaW5rfFByw6l0w6lyaXRzIGVuIDwtRVc+ICYgcGFydGljaXBlcyBwYXNzw6lzIGVuIDwtTj47RHJhdztHcm93O0tub3c7Qmxvd3xQYXJ0aWNpcGVzIHBhc3PDqXMgZW4gPC1FTj47V2FrZTtTaGFrZTtGb3JnaXZlO0JpdGU=

Web-app generated link: http://www.moohar.com/only-connect/edit.html?NHxQcul06XJpdHMgZXQgcGFydGljaXBlIHBhc3PpcyBpZGVudGlxdWVzO0hhdmU7TWFrZTtQYXk7U2F5fFBy6XTpcml0cyBldCBwYXJ0aWNpcGVzIHBhc3PpcyBlbiA8LUdIVD47Q2F0Y2g7QnV5O0ZpZ2h0O1RoaW5rfFBy6XTpcml0cyBlbiA8LUVXPiAmIHBhcnRpY2lwZXMgcGFzc+lzIGVuIDwtTj47RHJhdztHcm93O0tub3c7Qmxvd3xQYXJ0aWNpcGVzIHBhc3PpcyBlbiA8LUVOPjtXYWtlO1NoYWtlO0ZvcmdpdmU7Qml0ZQ==

I would like to have the custom function encode the accented characters properly using the same btoa function used in the web app.

I hope you will be able to help me. Thanks a lot in advance :)

I haven't been able to edit the app script wihtout damaging the whole spreadsheet.

  • I have to apologize for my poor English skill. Unfortunately, I cannot understand `I would like to have the custom function encode the accented characters properly using the same btoa function used in the web app.`. In order to correctly understand your question, can you provide the sample input and output values you expect? First, I would like to correctly understand your question. – Tanaike Aug 15 '23 at 22:57

0 Answers0