Files
test/intern/uriconvert/uri_convert.hh
Germano Cavalcante 3ab65cff04 Windows: show popup after crash
Implements a crash dialog for Windows.

The crash popup provides the following actions:
- Restart: reopen Blender from the last saved or auto-saved time
- Report a Bug: forward to Blender bug tracker
- View Crash Log: open the .txt file with the crash log
- Close: Closes without any further action

Pull Request: https://projects.blender.org/blender/blender/pulls/129974
2025-04-04 18:38:53 +02:00

26 lines
937 B
C++

/* SPDX-FileCopyrightText: 2024 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
/** \file
* \ingroup intern_uri
*/
/**
* \brief Encodes a string into URL format by converting special characters into percent-encoded
* sequences.
*
* This function iterates over the provided C-string and replaces non-alphanumeric characters
* (except for '-', '_', '.', '~') with their hexadecimal representations prefixed with '%'.
* Spaces are converted into '+', following the conventions of URL encoding for forms
* (application/x-www-form-urlencoded).
*
* \param str: The input C-string to be URL-encoded.
* \param dst: The output buffer where the URL-encoded string will be stored.
* \param dst_size: The size of the output buffer `dst`.
* \return: `true` if encoding was successful, or `false` if the output buffer was insufficient.
*/
bool url_encode(const char *str, char *dst, size_t dst_size);